diff --git a/.gitignore b/.gitignore index 3a8d2d51d1..99c023dd24 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules *yarn-error.log +.DS_Store +lerna-debug.log diff --git a/docs-util/fixture-gen/.babelrc.js b/docs-util/fixture-gen/.babelrc.js new file mode 100644 index 0000000000..39c0fa3e45 --- /dev/null +++ b/docs-util/fixture-gen/.babelrc.js @@ -0,0 +1,13 @@ +let ignore = [`**/dist`]; + +// Jest needs to compile this code, but generally we don't want this copied +// to output folders +if (process.env.NODE_ENV !== `test`) { + ignore.push(`**/__tests__`); +} + +module.exports = { + sourceMaps: true, + presets: ["babel-preset-medusa-package"], + ignore, +}; diff --git a/docs-util/fixture-gen/.gitignore b/docs-util/fixture-gen/.gitignore new file mode 100644 index 0000000000..a2c424c876 --- /dev/null +++ b/docs-util/fixture-gen/.gitignore @@ -0,0 +1,4 @@ +dist/ +node_modules +*yarn-error.log + diff --git a/docs-util/fixture-gen/__tests__/admin/collection.js b/docs-util/fixture-gen/__tests__/admin/collection.js new file mode 100644 index 0000000000..7a1eac71e4 --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/collection.js @@ -0,0 +1,69 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const adminSeeder = require("../../helpers/admin-seeder"); +const productSeeder = require("../../helpers/product-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/admin/collections", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + await dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("POST /admin/products", () => { + beforeEach(async () => { + try { + await adminSeeder(dbConnection); + } catch (err) { + console.log(err); + throw err; + } + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a product", async () => { + const api = useApi(); + + const payload = { + title: "Summer Collection", + handle: "summer-collection", + }; + + const response = await api + .post("/admin/collections", payload, { + headers: { + Authorization: "Bearer test_token", + }, + }) + .catch((err) => { + console.log(err); + }); + expect(response.status).toEqual(200); + + fixtureWriter.addFixture("product_collection", response.data.collection); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/admin/customer.js b/docs-util/fixture-gen/__tests__/admin/customer.js new file mode 100644 index 0000000000..a77596d48b --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/customer.js @@ -0,0 +1,78 @@ +const path = require("path"); +const { dropDatabase } = require("pg-god"); +const { Customer, Address } = require("@medusajs/medusa"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const adminSeeder = require("../../helpers/admin-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/admin/customers", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + await dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("GET /admin/customers", () => { + let id; + + beforeEach(async () => { + try { + await adminSeeder(dbConnection); + const manager = dbConnection.manager; + + const created = manager.create(Customer, { + email: "test1@email.com", + }); + + const newly = await manager.save(created); + + id = newly.id; + } catch (err) { + console.log(err); + throw err; + } + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "address"`); + await manager.query(`DELETE FROM "customer"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("lists customers and query count", async () => { + const api = useApi(); + + const response = await api + .get(`/admin/customers/${id}`, { + headers: { + Authorization: "Bearer test_token", + }, + }) + .catch((err) => { + console.log(err); + }); + + expect(response.status).toEqual(200); + + fixtureWriter.addFixture("customer", response.data.customer); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/admin/discount.js b/docs-util/fixture-gen/__tests__/admin/discount.js new file mode 100644 index 0000000000..af82d122be --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/discount.js @@ -0,0 +1,82 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); +const { Region } = require("@medusajs/medusa"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const adminSeeder = require("../../helpers/admin-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/discounts", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("POST /store/carts", () => { + let regId; + beforeEach(async () => { + await adminSeeder(dbConnection); + const manager = dbConnection.manager; + const created = manager.create(Region, { + id: "region", + name: "Test Region", + currency_code: "usd", + tax_rate: 0, + }); + const newReg = await manager.save(created); + regId = newReg.id; + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "discount"`); + await manager.query(`DELETE FROM "discount_rule"`); + await manager.query(`DELETE FROM "region"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a cart", async () => { + const api = useApi(); + + const getRes = await api.post( + `/admin/discounts`, + { + code: "10DISC", + rule: { + description: "10 Percent", + type: "percentage", + allocation: "total", + value: 10, + }, + regions: [regId], + }, + { + headers: { + Authorization: "Bearer test_token", + }, + } + ); + expect(getRes.status).toEqual(200); + + fixtureWriter.addFixture("discount", getRes.data.discount); + fixtureWriter.addFixture("discount_rule", getRes.data.discount.rule); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/admin/gift-card.js b/docs-util/fixture-gen/__tests__/admin/gift-card.js new file mode 100644 index 0000000000..bd779029de --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/gift-card.js @@ -0,0 +1,75 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); +const { Region } = require("@medusajs/medusa"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const adminSeeder = require("../../helpers/admin-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/discounts", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("POST /admin/gift-cards", () => { + let regId; + beforeEach(async () => { + await adminSeeder(dbConnection); + const manager = dbConnection.manager; + const created = manager.create(Region, { + name: "Test Region", + currency_code: "usd", + tax_rate: 0, + }); + const newReg = await manager.save(created); + regId = newReg.id; + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "discount"`); + await manager.query(`DELETE FROM "discount_rule"`); + await manager.query(`DELETE FROM "gift_card"`); + await manager.query(`DELETE FROM "region"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a cart", async () => { + const api = useApi(); + + const getRes = await api.post( + `/admin/gift-cards`, + { + value: 1000, + region_id: regId, + }, + { + headers: { + Authorization: "Bearer test_token", + }, + } + ); + expect(getRes.status).toEqual(200); + + fixtureWriter.addFixture("gift_card", getRes.data.gift_card); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/admin/notification.js b/docs-util/fixture-gen/__tests__/admin/notification.js new file mode 100644 index 0000000000..64941e1bb0 --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/notification.js @@ -0,0 +1,73 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); +const { Notification } = require("@medusajs/medusa"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const orderSeeder = require("../../helpers/order-seeder"); +const adminSeeder = require("../../helpers/admin-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/admin/orders", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + await dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("GET /notifications", () => { + beforeEach(async () => { + try { + await adminSeeder(dbConnection); + const manager = dbConnection.manager; + + const noti = manager.create(Notification, { + event_name: "order.placed", + resource_type: "order", + resource_id: "order_01F0BF66ZBXNJ98WDQ9SCWH8Y7", + provider_id: "test-not", + data: {}, + to: "test@email.com", + }); + await manager.save(noti); + } catch (err) { + console.log(err); + throw err; + } + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "notification"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a claim", async () => { + const api = useApi(); + + const response = await api.get(`/admin/notifications`, { + headers: { + authorization: "Bearer test_token", + }, + }); + expect(response.status).toEqual(200); + + fixtureWriter.addFixture("notification", response.data.notifications[0]); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/admin/order.js b/docs-util/fixture-gen/__tests__/admin/order.js new file mode 100644 index 0000000000..d364398ac8 --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/order.js @@ -0,0 +1,164 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const orderSeeder = require("../../helpers/order-seeder"); +const adminSeeder = require("../../helpers/admin-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/admin/orders", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + await dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("GET /admin/orders/:id", () => { + let id; + beforeEach(async () => { + try { + await adminSeeder(dbConnection); + const order = await orderSeeder(dbConnection); + id = order.id; + } catch (err) { + console.log(err); + throw err; + } + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "cart"`); + await manager.query(`DELETE FROM "fulfillment_item"`); + await manager.query(`DELETE FROM "fulfillment"`); + await manager.query(`DELETE FROM "swap"`); + await manager.query(`DELETE FROM "return"`); + await manager.query(`DELETE FROM "claim_image"`); + await manager.query(`DELETE FROM "claim_tag"`); + await manager.query(`DELETE FROM "claim_item"`); + await manager.query(`DELETE FROM "shipping_method"`); + await manager.query(`DELETE FROM "line_item"`); + await manager.query(`DELETE FROM "claim_order"`); + await manager.query(`DELETE FROM "money_amount"`); + await manager.query(`DELETE FROM "product_option_value"`); + await manager.query(`DELETE FROM "product_option"`); + await manager.query(`DELETE FROM "product_variant"`); + await manager.query(`DELETE FROM "product"`); + await manager.query(`DELETE FROM "shipping_option"`); + await manager.query(`DELETE FROM "discount"`); + await manager.query(`DELETE FROM "payment"`); + await manager.query(`DELETE FROM "order"`); + await manager.query(`DELETE FROM "customer"`); + await manager.query( + `UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'` + ); + await manager.query(`DELETE FROM "region"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a claim", async () => { + const api = useApi(); + + const response = await api.get(`/admin/orders/${id}`, { + headers: { + authorization: "Bearer test_token", + }, + }); + expect(response.status).toEqual(200); + + fixtureWriter.addFixture("order", response.data.order); + }); + }); + + describe("POST /admin/orders/:id/returns", () => { + let id; + beforeEach(async () => { + try { + await adminSeeder(dbConnection); + const order = await orderSeeder(dbConnection); + id = order.id; + } catch (err) { + console.log(err); + throw err; + } + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "cart"`); + await manager.query(`DELETE FROM "fulfillment_item"`); + await manager.query(`DELETE FROM "fulfillment"`); + await manager.query(`DELETE FROM "swap"`); + await manager.query(`DELETE FROM "return_item"`); + await manager.query(`DELETE FROM "return"`); + await manager.query(`DELETE FROM "claim_image"`); + await manager.query(`DELETE FROM "claim_tag"`); + await manager.query(`DELETE FROM "claim_item"`); + await manager.query(`DELETE FROM "shipping_method"`); + await manager.query(`DELETE FROM "line_item"`); + await manager.query(`DELETE FROM "claim_order"`); + await manager.query(`DELETE FROM "money_amount"`); + await manager.query(`DELETE FROM "product_option_value"`); + await manager.query(`DELETE FROM "product_option"`); + await manager.query(`DELETE FROM "product_variant"`); + await manager.query(`DELETE FROM "product"`); + await manager.query(`DELETE FROM "shipping_option"`); + await manager.query(`DELETE FROM "discount"`); + await manager.query(`DELETE FROM "payment"`); + await manager.query(`DELETE FROM "order"`); + await manager.query(`DELETE FROM "customer"`); + await manager.query( + `UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'` + ); + await manager.query(`DELETE FROM "region"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a return", async () => { + const api = useApi(); + + const { data } = await api.get(`/admin/orders/${id}`, { + headers: { + authorization: "Bearer test_token", + }, + }); + const order = data.order; + + const response = await api.post( + `/admin/orders/${id}/return`, + { + items: [ + { + item_id: order.items[0].id, + quantity: 1, + }, + ], + }, + { + headers: { + authorization: "Bearer test_token", + }, + } + ); + expect(response.status).toEqual(200); + + fixtureWriter.addFixture("return", response.data.order.returns[0]); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/admin/product.js b/docs-util/fixture-gen/__tests__/admin/product.js new file mode 100644 index 0000000000..c086913647 --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/product.js @@ -0,0 +1,110 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const adminSeeder = require("../../helpers/admin-seeder"); +const productSeeder = require("../../helpers/product-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/admin/products", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + await dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("POST /admin/products", () => { + beforeEach(async () => { + try { + await productSeeder(dbConnection); + await adminSeeder(dbConnection); + } catch (err) { + console.log(err); + throw err; + } + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "product_option_value"`); + await manager.query(`DELETE FROM "product_option"`); + await manager.query(`DELETE FROM "money_amount"`); + await manager.query(`DELETE FROM "product_variant"`); + await manager.query(`DELETE FROM "product"`); + await manager.query(`DELETE FROM "product_collection"`); + await manager.query(`DELETE FROM "product_tag"`); + await manager.query(`DELETE FROM "product_type"`); + await manager.query( + `UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'` + ); + await manager.query(`DELETE FROM "region"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a product", async () => { + const api = useApi(); + + const payload = { + title: "Test product", + description: "test-product-description", + type: { value: "test-type" }, + collection_id: "test-collection", + tags: [{ value: "123" }, { value: "456" }], + options: [{ title: "size" }, { title: "color" }], + variants: [ + { + title: "Test variant", + inventory_quantity: 10, + prices: [{ currency_code: "usd", amount: 100 }], + options: [{ value: "large" }, { value: "green" }], + }, + ], + }; + + const response = await api + .post("/admin/products", payload, { + headers: { + Authorization: "Bearer test_token", + }, + }) + .catch((err) => { + console.log(err); + }); + expect(response.status).toEqual(200); + + fixtureWriter.addFixture("product", response.data.product); + fixtureWriter.addFixture( + "product_variant", + response.data.product.variants[0] + ); + fixtureWriter.addFixture( + "product_option", + response.data.product.options[0] + ); + fixtureWriter.addFixture( + "product_option_value", + response.data.product.variants[0].options[0] + ); + fixtureWriter.addFixture( + "money_amount", + response.data.product.variants[0].prices[0] + ); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/admin/shipping-option.js b/docs-util/fixture-gen/__tests__/admin/shipping-option.js new file mode 100644 index 0000000000..353a0c515d --- /dev/null +++ b/docs-util/fixture-gen/__tests__/admin/shipping-option.js @@ -0,0 +1,87 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); +const { Region } = require("@medusajs/medusa"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const adminSeeder = require("../../helpers/admin-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/shipping-options", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("POST /admin/shipping-options", () => { + let regId; + beforeEach(async () => { + await adminSeeder(dbConnection); + const manager = dbConnection.manager; + const created = manager.create(Region, { + name: "Test Region", + currency_code: "usd", + tax_rate: 0, + fulfillment_providers: [ + { + id: "test-ful", + }, + ], + }); + const newReg = await manager.save(created); + regId = newReg.id; + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "shipping_option"`); + await manager.query(`DELETE FROM "region"`); + await manager.query(`DELETE FROM "user"`); + }); + + it("creates a cart", async () => { + const api = useApi(); + + const getRes = await api.post( + `/admin/shipping-options`, + { + name: "Free Shipping", + region_id: regId, + provider_id: "test-ful", + data: {}, + price_type: "flat_rate", + amount: 100, + }, + { + headers: { + Authorization: "Bearer test_token", + }, + } + ); + expect(getRes.status).toEqual(200); + + fixtureWriter.addFixture("region", getRes.data.shipping_option.region); + fixtureWriter.addFixture("shipping_option", getRes.data.shipping_option); + fixtureWriter.addFixture( + "shipping_profile", + getRes.data.shipping_option.shipping_profile + ); + }); + }); +}); diff --git a/docs-util/fixture-gen/__tests__/store/cart.js b/docs-util/fixture-gen/__tests__/store/cart.js new file mode 100644 index 0000000000..1d0845db42 --- /dev/null +++ b/docs-util/fixture-gen/__tests__/store/cart.js @@ -0,0 +1,67 @@ +const { dropDatabase } = require("pg-god"); +const path = require("path"); +const { Region } = require("@medusajs/medusa"); + +const setupServer = require("../../../helpers/setup-server"); +const { useApi } = require("../../../helpers/use-api"); +const { initDb } = require("../../../helpers/use-db"); + +const cartSeeder = require("../../helpers/cart-seeder"); + +const fixtureWriter = require("../../utils/write-fixture").default; + +jest.setTimeout(30000); + +describe("/store/carts", () => { + let medusaProcess; + let dbConnection; + + beforeAll(async () => { + const cwd = path.resolve(path.join(__dirname, "..", "..")); + dbConnection = await initDb({ cwd }); + medusaProcess = await setupServer({ cwd }); + }); + + afterAll(async () => { + dbConnection.close(); + await dropDatabase({ databaseName: "medusa-fixtures" }); + + medusaProcess.kill(); + }); + + describe("POST /store/carts", () => { + beforeEach(async () => { + const manager = dbConnection.manager; + await manager.insert(Region, { + id: "region", + name: "Test Region", + currency_code: "usd", + tax_rate: 0, + }); + await manager.query( + `UPDATE "country" SET region_id='region' WHERE iso_2 = 'us'` + ); + }); + + afterEach(async () => { + const manager = dbConnection.manager; + await manager.query(`DELETE FROM "cart"`); + await manager.query( + `UPDATE "country" SET region_id=NULL WHERE iso_2 = 'us'` + ); + await manager.query(`DELETE FROM "region"`); + }); + + it("creates a cart", async () => { + const api = useApi(); + + const response = await api.post("/store/carts"); + expect(response.status).toEqual(200); + + const getRes = await api.post(`/store/carts/${response.data.cart.id}`); + expect(getRes.status).toEqual(200); + + fixtureWriter.addFixture("cart", getRes.data.cart); + }); + }); +}); diff --git a/docs-util/fixture-gen/helpers/admin-seeder.js b/docs-util/fixture-gen/helpers/admin-seeder.js new file mode 100644 index 0000000000..9a21256360 --- /dev/null +++ b/docs-util/fixture-gen/helpers/admin-seeder.js @@ -0,0 +1,17 @@ +const Scrypt = require("scrypt-kdf"); +const { User } = require("@medusajs/medusa"); + +module.exports = async (connection, data = {}) => { + const manager = connection.manager; + + const buf = await Scrypt.kdf("secret_password", { logN: 1, r: 1, p: 1 }); + const password_hash = buf.toString("base64"); + + await manager.insert(User, { + id: "admin_user", + email: "admin@medusa.js", + api_token: "test_token", + password_hash, + ...data, + }); +}; diff --git a/docs-util/fixture-gen/helpers/cart-seeder.js b/docs-util/fixture-gen/helpers/cart-seeder.js new file mode 100644 index 0000000000..ae8a00304d --- /dev/null +++ b/docs-util/fixture-gen/helpers/cart-seeder.js @@ -0,0 +1,47 @@ +const { Customer, Region, Cart } = require("@medusajs/medusa"); + +module.exports = async (connection, data = {}) => { + const manager = connection.manager; + + await manager.insert(Region, { + id: "test-region", + name: "Test Region", + currency_code: "usd", + tax_rate: 0, + }); + + await manager.query( + `UPDATE "country" SET region_id='test-region' WHERE iso_2 = 'us'` + ); + + await manager.insert(Customer, { + id: "test-customer", + email: "test@email.com", + }); + + await manager.insert(Customer, { + id: "test-customer-2", + email: "test-2@email.com", + }); + + await manager.insert(Customer, { + id: "some-customer", + email: "some-customer@email.com", + }); + + const cart = manager.create(Cart, { + id: "test-cart", + customer_id: "some-customer", + email: "some-customer@email.com", + shipping_address: { + id: "test-shipping-address", + first_name: "lebron", + country_code: "us", + }, + region_id: "test-region", + currency_code: "usd", + items: [], + }); + + await manager.save(cart); +}; diff --git a/docs-util/fixture-gen/helpers/customer-seeder.js b/docs-util/fixture-gen/helpers/customer-seeder.js new file mode 100644 index 0000000000..78b3e22ec5 --- /dev/null +++ b/docs-util/fixture-gen/helpers/customer-seeder.js @@ -0,0 +1,27 @@ +const { Customer, Address } = require("@medusajs/medusa"); + +module.exports = async (connection, data = {}) => { + const manager = connection.manager; + + await manager.insert(Customer, { + id: "test-customer-1", + email: "test1@email.com", + }); + + await manager.insert(Customer, { + id: "test-customer-2", + email: "test2@email.com", + }); + + await manager.insert(Customer, { + id: "test-customer-3", + email: "test3@email.com", + }); + + await manager.insert(Address, { + id: "test-address", + first_name: "Lebron", + last_name: "James", + customer_id: "test-customer-1", + }); +}; diff --git a/docs-util/fixture-gen/helpers/order-seeder.js b/docs-util/fixture-gen/helpers/order-seeder.js new file mode 100644 index 0000000000..c1393f980c --- /dev/null +++ b/docs-util/fixture-gen/helpers/order-seeder.js @@ -0,0 +1,152 @@ +const { + ShippingProfile, + Customer, + MoneyAmount, + LineItem, + Country, + ShippingOption, + ShippingMethod, + Product, + ProductOption, + ProductVariant, + Region, + Order, +} = require("@medusajs/medusa"); + +module.exports = async (connection, data = {}) => { + const manager = connection.manager; + + const defaultProfile = await manager.findOne(ShippingProfile, { + type: "default", + }); + + const prodOption = manager.create(ProductOption, { + title: "Size", + }); + const newProdOption = await manager.save(prodOption); + + const prod = manager.create(Product, { + title: "test product", + profile_id: defaultProfile.id, + options: [newProdOption], + }); + const newProd = await manager.save(prod); + + const prodVar = manager.create(ProductVariant, { + title: "test variant", + product_id: newProd.id, + inventory_quantity: 1, + options: [ + { + option_id: newProdOption.id, + value: "Size", + }, + ], + }); + const newProdVar = manager.save(prodVar); + + const ma = manager.create(MoneyAmount, { + variant_id: newProdVar.id, + currency_code: "usd", + amount: 8000, + }); + await manager.save(ma); + + const region = manager.create(Region, { + name: "Test Region", + currency_code: "usd", + tax_rate: 0, + }); + const newReg = await manager.save(region); + + await manager.query( + `UPDATE "country" SET region_id='${newReg.id}' WHERE iso_2 = 'us'` + ); + + const customer = manager.create(Customer, { + email: "test@email.com", + }); + const newCustomer = await manager.save(customer); + + const shipOpt = manager.create(ShippingOption, { + name: "test-option", + provider_id: "test-ful", + region_id: newReg.id, + profile_id: defaultProfile.id, + price_type: "flat_rate", + amount: 1000, + data: {}, + }); + const newShipOpt = await manager.save(shipOpt); + + const order = manager.create(Order, { + customer_id: newCustomer.id, + email: "test@email.com", + billing_address: { + first_name: "lebron", + }, + shipping_address: { + first_name: "lebron", + country_code: "us", + }, + region_id: newReg.id, + currency_code: "usd", + tax_rate: 0, + discounts: [ + { + id: "test-discount", + code: "TEST134", + is_dynamic: false, + rule: { + id: "test-rule", + description: "Test Discount", + type: "percentage", + value: 10, + allocation: "total", + }, + is_disabled: false, + regions: [ + { + id: newReg.id, + }, + ], + }, + ], + payments: [ + { + id: "test-payment", + amount: 10000, + currency_code: "usd", + amount_refunded: 0, + provider_id: "test", + data: {}, + }, + ], + items: [ + { + id: "test-item", + fulfilled_quantity: 1, + title: "Line Item", + description: "Line Item Desc", + thumbnail: "https://test.js/1234", + unit_price: 8000, + quantity: 1, + variant_id: newProdVar.id, + }, + ], + ...data, + }); + + const newOrder = await manager.save(order); + + const shipMeth = manager.create(ShippingMethod, { + order_id: newOrder.id, + shipping_option_id: newShipOpt.id, + price: 1000, + data: {}, + }); + + await manager.save(shipMeth); + + return newOrder; +}; diff --git a/docs-util/fixture-gen/helpers/product-seeder.js b/docs-util/fixture-gen/helpers/product-seeder.js new file mode 100644 index 0000000000..14255c729e --- /dev/null +++ b/docs-util/fixture-gen/helpers/product-seeder.js @@ -0,0 +1,68 @@ +const { + ProductCollection, + ProductTag, + ProductType, + Region, + Product, + ShippingProfile, + ProductVariant, +} = require("@medusajs/medusa"); + +module.exports = async (connection, data = {}) => { + const manager = connection.manager; + + const defaultProfile = await manager.findOne(ShippingProfile, { + type: "default", + }); + + const coll = manager.create(ProductCollection, { + id: "test-collection", + title: "Test collection", + }); + + await manager.save(coll); + + const tag = manager.create(ProductTag, { + id: "tag1", + value: "123", + }); + + await manager.save(tag); + + const type = manager.create(ProductType, { + id: "test-type", + value: "test-type", + }); + + await manager.save(type); + + await manager.insert(Region, { + id: "test-region", + name: "Test Region", + currency_code: "usd", + tax_rate: 0, + }); + + await manager.insert(Product, { + id: "test-product", + title: "Test product", + profile_id: defaultProfile.id, + description: "test-product-description", + collection_id: "test-collection", + type: { id: "test-type", value: "test-type" }, + tags: [ + { id: "tag1", value: "123" }, + { tag: "tag2", value: "456" }, + ], + options: [{ id: "test-option", title: "Default value" }], + }); + + await manager.insert(ProductVariant, { + id: "test-variant", + inventory_quantity: 10, + title: "Test variant", + product_id: "test-product", + prices: [{ id: "test-price", currency_code: "usd", amount: 100 }], + options: [{ id: "test-variant-option", value: "Default variant" }], + }); +}; diff --git a/docs-util/fixture-gen/medusa-config.js b/docs-util/fixture-gen/medusa-config.js new file mode 100644 index 0000000000..708635b637 --- /dev/null +++ b/docs-util/fixture-gen/medusa-config.js @@ -0,0 +1,8 @@ +module.exports = { + plugins: [], + projectConfig: { + // redis_url: REDIS_URL, + database_url: "postgres://localhost/medusa-fixtures", + database_type: "postgres", + }, +}; diff --git a/docs-util/fixture-gen/package.json b/docs-util/fixture-gen/package.json new file mode 100644 index 0000000000..40595aaf5b --- /dev/null +++ b/docs-util/fixture-gen/package.json @@ -0,0 +1,19 @@ +{ + "name": "api", + "version": "1.0.0", + "main": "index.js", + "license": "MIT", + "scripts": { + "build": "babel src -d dist --extensions \".ts,.js\"" + }, + "dependencies": { + "@medusajs/medusa": "^1.1.3", + "medusa-interfaces": "^1.1.0" + }, + "devDependencies": { + "@babel/cli": "^7.12.10", + "@babel/core": "^7.12.10", + "@babel/node": "^7.12.10", + "babel-preset-medusa-package": "^1.1.0" + } +} \ No newline at end of file diff --git a/docs-util/fixture-gen/setup.js b/docs-util/fixture-gen/setup.js new file mode 100644 index 0000000000..f53bd5693f --- /dev/null +++ b/docs-util/fixture-gen/setup.js @@ -0,0 +1,12 @@ +const fixtureWriter = require("./utils/write-fixture").default; +const { dropDatabase } = require("pg-god"); + +beforeAll(() => { + console.log(fixtureWriter); +}); + +afterAll(async () => { + console.log(fixtureWriter); + await dropDatabase({ databaseName: "medusa-fixtures" }); + await fixtureWriter.execute(); +}); diff --git a/docs-util/fixture-gen/src/services/test-ful.js b/docs-util/fixture-gen/src/services/test-ful.js new file mode 100644 index 0000000000..8d25e5725e --- /dev/null +++ b/docs-util/fixture-gen/src/services/test-ful.js @@ -0,0 +1,49 @@ +import { FulfillmentService } from "medusa-interfaces"; + +class TestFulService extends FulfillmentService { + static identifier = "test-ful"; + + constructor() { + super(); + } + + getFulfillmentOptions() { + return [ + { + id: "manual-fulfillment", + }, + ]; + } + + validateFulfillmentData(data, cart) { + return data; + } + + validateOption(data) { + return true; + } + + canCalculate() { + return false; + } + + calculatePrice() { + throw Error("Manual Fulfillment service cannot calculatePrice"); + } + + createOrder() { + // No data is being sent anywhere + return Promise.resolve({}); + } + + createFulfillment() { + // No data is being sent anywhere + return Promise.resolve({}); + } + + cancelFulfillment() { + return Promise.resolve({}); + } +} + +export default TestFulService; diff --git a/docs-util/fixture-gen/src/services/test-not.js b/docs-util/fixture-gen/src/services/test-not.js new file mode 100644 index 0000000000..77f3d9340e --- /dev/null +++ b/docs-util/fixture-gen/src/services/test-not.js @@ -0,0 +1,19 @@ +import { NotificationService } from "medusa-interfaces"; + +class TestNotiService extends NotificationService { + static identifier = "test-not"; + + constructor() { + super(); + } + + async sendNotification() { + return Promise.resolve(); + } + + async resendNotification() { + return Promise.resolve(); + } +} + +export default TestNotiService; diff --git a/docs-util/fixture-gen/src/services/test-pay.js b/docs-util/fixture-gen/src/services/test-pay.js new file mode 100644 index 0000000000..481261b3a0 --- /dev/null +++ b/docs-util/fixture-gen/src/services/test-pay.js @@ -0,0 +1,59 @@ +import { PaymentService } from "medusa-interfaces"; + +class TestPayService extends PaymentService { + static identifier = "test-pay"; + + constructor() { + super(); + } + + async getStatus(paymentData) { + return "authorized"; + } + + async retrieveSavedMethods(customer) { + return Promise.resolve([]); + } + + async createPayment() { + return {}; + } + + async retrievePayment(data) { + return {}; + } + + async getPaymentData(sessionData) { + return {}; + } + + async authorizePayment(sessionData, context = {}) { + return {}; + } + + async updatePaymentData(sessionData, update) { + return {}; + } + + async updatePayment(sessionData, cart) { + return {}; + } + + async deletePayment(payment) { + return {}; + } + + async capturePayment(payment) { + return {}; + } + + async refundPayment(payment, amountToRefund) { + return {}; + } + + async cancelPayment(payment) { + return {}; + } +} + +export default TestPayService; diff --git a/docs-util/fixture-gen/utils/write-fixture.js b/docs-util/fixture-gen/utils/write-fixture.js new file mode 100644 index 0000000000..ad8a67c91b --- /dev/null +++ b/docs-util/fixture-gen/utils/write-fixture.js @@ -0,0 +1,30 @@ +const fs = require("fs").promises; +const path = require("path"); + +class FixtureWriter { + constructor() { + const resolvedPath = path.resolve("./docs/api/fixtures.json"); + const existing = require(resolvedPath); + + this.toWrite_ = existing.resources; + this.resolvedPath_ = resolvedPath; + } + + addFixture(key, data) { + this.toWrite_ = { + ...this.toWrite_, + [key]: data, + }; + } + + async execute() { + const toSet = { + resources: this.toWrite_, + }; + const s = JSON.stringify(toSet, null, 2); + return await fs.writeFile(this.resolvedPath_, s); + } +} + +const instance = new FixtureWriter(); +export default instance; diff --git a/docs-util/fixture-gen/yarn.lock b/docs-util/fixture-gen/yarn.lock new file mode 100644 index 0000000000..036fd50a59 --- /dev/null +++ b/docs-util/fixture-gen/yarn.lock @@ -0,0 +1,4273 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/cli@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.12.10.tgz#67a1015b1cd505bde1696196febf910c4c339a48" + integrity sha512-+y4ZnePpvWs1fc/LhZRTHkTesbXkyBYuOB+5CyodZqrEuETXi3zOVfpAQIdgC3lXbHLTDG9dQosxR9BhvLKDLQ== + dependencies: + commander "^4.0.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.1.0" + glob "^7.0.0" + lodash "^4.17.19" + make-dir "^2.1.0" + slash "^2.0.0" + source-map "^0.5.0" + optionalDependencies: + "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents" + chokidar "^3.4.0" + +"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/compat-data@^7.12.5", "@babel/compat-data@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.7.tgz#9329b4782a7d6bbd7eef57e11addf91ee3ef1e41" + integrity sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw== + +"@babel/core@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.12.10" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helpers" "^7.12.5" + "@babel/parser" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== + dependencies: + "@babel/types" "^7.12.11" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-annotate-as-pure@^7.10.4": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz#54ab9b000e60a93644ce17b3f37d313aaf1d115d" + integrity sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ== + dependencies: + "@babel/types" "^7.12.10" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz#bb0b75f31bf98cbf9ff143c1ae578b87274ae1a3" + integrity sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helper-compilation-targets@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz#cb470c76198db6a24e9dbc8987275631e5d29831" + integrity sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw== + dependencies: + "@babel/compat-data" "^7.12.5" + "@babel/helper-validator-option" "^7.12.1" + browserslist "^4.14.5" + semver "^5.5.0" + +"@babel/helper-create-class-features-plugin@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz#3c45998f431edd4a9214c5f1d3ad1448a6137f6e" + integrity sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-member-expression-to-functions" "^7.12.1" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.10.4" + +"@babel/helper-create-regexp-features-plugin@^7.12.1": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz#2084172e95443fa0a09214ba1bb328f9aea1278f" + integrity sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + regexpu-core "^4.7.1" + +"@babel/helper-define-map@^7.10.4": + version "7.10.5" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz#b53c10db78a640800152692b13393147acb9bb30" + integrity sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/types" "^7.10.5" + lodash "^4.17.19" + +"@babel/helper-explode-assignable-expression@^7.10.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz#8006a466695c4ad86a2a5f2fb15b5f2c31ad5633" + integrity sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-function-name@^7.10.4", "@babel/helper-function-name@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" + +"@babel/helper-get-function-arity@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== + dependencies: + "@babel/types" "^7.12.10" + +"@babel/helper-hoist-variables@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz#d49b001d1d5a68ca5e6604dda01a6297f7c9381e" + integrity sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA== + dependencies: + "@babel/types" "^7.10.4" + +"@babel/helper-member-expression-to-functions@^7.12.1", "@babel/helper-member-expression-to-functions@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855" + integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw== + dependencies: + "@babel/types" "^7.12.7" + +"@babel/helper-module-imports@^7.12.1", "@babel/helper-module-imports@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" + integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== + dependencies: + "@babel/types" "^7.12.5" + +"@babel/helper-module-transforms@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" + integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== + dependencies: + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-simple-access" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.11.0" + "@babel/helper-validator-identifier" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.1" + "@babel/types" "^7.12.1" + lodash "^4.17.19" + +"@babel/helper-optimise-call-expression@^7.10.4", "@babel/helper-optimise-call-expression@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" + integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== + dependencies: + "@babel/types" "^7.12.10" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" + integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== + +"@babel/helper-remap-async-to-generator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz#8c4dbbf916314f6047dc05e6a2217074238347fd" + integrity sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-wrap-function" "^7.10.4" + "@babel/types" "^7.12.1" + +"@babel/helper-replace-supers@^7.12.1": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz#ea511658fc66c7908f923106dd88e08d1997d60d" + integrity sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.12.7" + "@babel/helper-optimise-call-expression" "^7.12.10" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.11" + +"@babel/helper-simple-access@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" + integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-skip-transparent-expression-wrappers@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" + integrity sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== + dependencies: + "@babel/types" "^7.12.1" + +"@babel/helper-split-export-declaration@^7.10.4", "@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== + dependencies: + "@babel/types" "^7.12.11" + +"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + +"@babel/helper-validator-option@^7.12.1", "@babel/helper-validator-option@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" + integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw== + +"@babel/helper-wrap-function@^7.10.4": + version "7.12.3" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz#3332339fc4d1fbbf1c27d7958c27d34708e990d9" + integrity sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.10.4" + "@babel/types" "^7.10.4" + +"@babel/helpers@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" + integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== + dependencies: + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" + +"@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/node@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/node/-/node-7.12.10.tgz#2a78e1a3a98f08e0d5e8adbaba783bed5efb09ae" + integrity sha512-lJT1sXp1bEfAZ7B2ChEOOiUxaGbIWkcAixqZDpbHnJWUqIjoofOGo5ON1bJ9HOmtMdF7rqKiOoM7zZSI87El3g== + dependencies: + "@babel/register" "^7.12.10" + commander "^4.0.1" + core-js "^3.2.1" + lodash "^4.17.19" + node-environment-flags "^1.0.5" + regenerator-runtime "^0.13.4" + v8flags "^3.1.1" + +"@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== + +"@babel/plugin-proposal-async-generator-functions@^7.12.1": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz#04b8f24fd4532008ab4e79f788468fd5a8476566" + integrity sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.12.1" + "@babel/plugin-syntax-async-generators" "^7.8.0" + +"@babel/plugin-proposal-class-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz#a082ff541f2a29a4821065b8add9346c0c16e5de" + integrity sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-proposal-decorators@^7.12.1": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.12.12.tgz#067a6d3d6ca86d54cf56bb183239199c20daeafe" + integrity sha512-fhkE9lJYpw2mjHelBpM2zCbaA11aov2GJs7q4cFaXNrWx0H3bW58H9Esy2rdtYOghFBEYUDRIpvlgi+ZD+AvvQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-decorators" "^7.12.1" + +"@babel/plugin-proposal-dynamic-import@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz#43eb5c2a3487ecd98c5c8ea8b5fdb69a2749b2dc" + integrity sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + +"@babel/plugin-proposal-export-namespace-from@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz#8b9b8f376b2d88f5dd774e4d24a5cc2e3679b6d4" + integrity sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + +"@babel/plugin-proposal-json-strings@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz#d45423b517714eedd5621a9dfdc03fa9f4eb241c" + integrity sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-json-strings" "^7.8.0" + +"@babel/plugin-proposal-logical-assignment-operators@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz#f2c490d36e1b3c9659241034a5d2cd50263a2751" + integrity sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz#3ed4fff31c015e7f3f1467f190dbe545cd7b046c" + integrity sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + +"@babel/plugin-proposal-numeric-separator@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz#8bf253de8139099fea193b297d23a9d406ef056b" + integrity sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-proposal-object-rest-spread@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz#def9bd03cea0f9b72283dac0ec22d289c7691069" + integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-transform-parameters" "^7.12.1" + +"@babel/plugin-proposal-optional-catch-binding@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz#ccc2421af64d3aae50b558a71cede929a5ab2942" + integrity sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + +"@babel/plugin-proposal-optional-chaining@^7.12.1", "@babel/plugin-proposal-optional-chaining@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz#e02f0ea1b5dc59d401ec16fb824679f683d3303c" + integrity sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + +"@babel/plugin-proposal-private-methods@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz#86814f6e7a21374c980c10d38b4493e703f4a389" + integrity sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-proposal-unicode-property-regex@^7.12.1", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz#2a183958d417765b9eae334f47758e5d6a82e072" + integrity sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-async-generators@^7.8.0": + version "7.8.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" + integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-class-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz#bcb297c5366e79bebadef509549cd93b04f19978" + integrity sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-decorators@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.12.1.tgz#81a8b535b284476c41be6de06853a8802b98c5dd" + integrity sha512-ir9YW5daRrTYiy9UJ2TzdNIJEZu8KclVzDcfSt4iEmOtwQ4llPtWInNKJyKnVXp1vE4bbVd5S31M/im3mYMO1w== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-dynamic-import@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" + integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-json-strings@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz#167ed70368886081f74b5c36c65a88c03b66d1a9" + integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-object-rest-spread@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" + integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-catch-binding@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz#6111a265bcfb020eb9efd0fdfd7d26402b9ed6c1" + integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-optional-chaining@^7.8.0": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz#4f69c2ab95167e0180cd5336613f8c5788f7d48a" + integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-top-level-await@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz#dd6c0b357ac1bb142d98537450a319625d13d2a0" + integrity sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-arrow-functions@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz#8083ffc86ac8e777fbe24b5967c4b2521f3cb2b3" + integrity sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-async-to-generator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz#3849a49cc2a22e9743cbd6b52926d30337229af1" + integrity sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A== + dependencies: + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-remap-async-to-generator" "^7.12.1" + +"@babel/plugin-transform-block-scoped-functions@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz#f2a1a365bde2b7112e0a6ded9067fdd7c07905d9" + integrity sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-block-scoping@^7.12.11": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz#d93a567a152c22aea3b1929bb118d1d0a175cdca" + integrity sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-classes@^7.12.1", "@babel/plugin-transform-classes@^7.9.5": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz#65e650fcaddd3d88ddce67c0f834a3d436a32db6" + integrity sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog== + dependencies: + "@babel/helper-annotate-as-pure" "^7.10.4" + "@babel/helper-define-map" "^7.10.4" + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-optimise-call-expression" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.10.4" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz#d68cf6c9b7f838a8a4144badbe97541ea0904852" + integrity sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-destructuring@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz#b9a570fe0d0a8d460116413cb4f97e8e08b2f847" + integrity sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-dotall-regex@^7.12.1", "@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz#a1d16c14862817b6409c0a678d6f9373ca9cd975" + integrity sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-duplicate-keys@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz#745661baba295ac06e686822797a69fbaa2ca228" + integrity sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-exponentiation-operator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz#b0f2ed356ba1be1428ecaf128ff8a24f02830ae0" + integrity sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-for-of@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz#07640f28867ed16f9511c99c888291f560921cfa" + integrity sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-function-name@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz#2ec76258c70fe08c6d7da154003a480620eba667" + integrity sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw== + dependencies: + "@babel/helper-function-name" "^7.10.4" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-instanceof@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-instanceof/-/plugin-transform-instanceof-7.12.1.tgz#085dc5160384a2bdc94c2f51158fab77b70ea73f" + integrity sha512-3sq5iK6kcvYm56NUVEo623eXmSgTT6rUEqrySOtC4IQ+pWAVtPRTkCirXoRhxHxjOdH8wg9L8mftmzUFaHtfAQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz#d73b803a26b37017ddf9d3bb8f4dc58bfb806f57" + integrity sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-member-expression-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz#496038602daf1514a64d43d8e17cbb2755e0c3ad" + integrity sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-modules-amd@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz#3154300b026185666eebb0c0ed7f8415fefcf6f9" + integrity sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ== + dependencies: + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-commonjs@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz#fa403124542636c786cf9b460a0ffbb48a86e648" + integrity sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag== + dependencies: + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-simple-access" "^7.12.1" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-systemjs@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz#663fea620d593c93f214a464cd399bf6dc683086" + integrity sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q== + dependencies: + "@babel/helper-hoist-variables" "^7.10.4" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-validator-identifier" "^7.10.4" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-umd@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz#eb5a218d6b1c68f3d6217b8fa2cc82fec6547902" + integrity sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q== + dependencies: + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz#b407f5c96be0d9f5f88467497fa82b30ac3e8753" + integrity sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + +"@babel/plugin-transform-new-target@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz#80073f02ee1bb2d365c3416490e085c95759dec0" + integrity sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-object-super@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz#4ea08696b8d2e65841d0c7706482b048bed1066e" + integrity sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-replace-supers" "^7.12.1" + +"@babel/plugin-transform-parameters@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz#d2e963b038771650c922eff593799c96d853255d" + integrity sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-property-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz#41bc81200d730abb4456ab8b3fbd5537b59adecd" + integrity sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-regenerator@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz#5f0a28d842f6462281f06a964e88ba8d7ab49753" + integrity sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng== + dependencies: + regenerator-transform "^0.14.2" + +"@babel/plugin-transform-reserved-words@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz#6fdfc8cc7edcc42b36a7c12188c6787c873adcd8" + integrity sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-runtime@^7.12.1": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.10.tgz#af0fded4e846c4b37078e8e5d06deac6cd848562" + integrity sha512-xOrUfzPxw7+WDm9igMgQCbO3cJKymX7dFdsgRr1eu9n3KjjyU4pptIXbXPseQDquw+W+RuJEJMHKHNsPNNm3CA== + dependencies: + "@babel/helper-module-imports" "^7.12.5" + "@babel/helper-plugin-utils" "^7.10.4" + semver "^5.5.1" + +"@babel/plugin-transform-shorthand-properties@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz#0bf9cac5550fce0cfdf043420f661d645fdc75e3" + integrity sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-spread@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz#527f9f311be4ec7fdc2b79bb89f7bf884b3e1e1e" + integrity sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-skip-transparent-expression-wrappers" "^7.12.1" + +"@babel/plugin-transform-sticky-regex@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz#560224613ab23987453948ed21d0b0b193fa7fad" + integrity sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-template-literals@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz#b43ece6ed9a79c0c71119f576d299ef09d942843" + integrity sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-typeof-symbol@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz#de01c4c8f96580bd00f183072b0d0ecdcf0dec4b" + integrity sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-unicode-escapes@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz#5232b9f81ccb07070b7c3c36c67a1b78f1845709" + integrity sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-transform-unicode-regex@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz#cc9661f61390db5c65e3febaccefd5c6ac3faecb" + integrity sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.12.1" + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/preset-env@^7.12.7": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.11.tgz#55d5f7981487365c93dbbc84507b1c7215e857f9" + integrity sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw== + dependencies: + "@babel/compat-data" "^7.12.7" + "@babel/helper-compilation-targets" "^7.12.5" + "@babel/helper-module-imports" "^7.12.5" + "@babel/helper-plugin-utils" "^7.10.4" + "@babel/helper-validator-option" "^7.12.11" + "@babel/plugin-proposal-async-generator-functions" "^7.12.1" + "@babel/plugin-proposal-class-properties" "^7.12.1" + "@babel/plugin-proposal-dynamic-import" "^7.12.1" + "@babel/plugin-proposal-export-namespace-from" "^7.12.1" + "@babel/plugin-proposal-json-strings" "^7.12.1" + "@babel/plugin-proposal-logical-assignment-operators" "^7.12.1" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.12.1" + "@babel/plugin-proposal-numeric-separator" "^7.12.7" + "@babel/plugin-proposal-object-rest-spread" "^7.12.1" + "@babel/plugin-proposal-optional-catch-binding" "^7.12.1" + "@babel/plugin-proposal-optional-chaining" "^7.12.7" + "@babel/plugin-proposal-private-methods" "^7.12.1" + "@babel/plugin-proposal-unicode-property-regex" "^7.12.1" + "@babel/plugin-syntax-async-generators" "^7.8.0" + "@babel/plugin-syntax-class-properties" "^7.12.1" + "@babel/plugin-syntax-dynamic-import" "^7.8.0" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-syntax-json-strings" "^7.8.0" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/plugin-syntax-object-rest-spread" "^7.8.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.0" + "@babel/plugin-syntax-top-level-await" "^7.12.1" + "@babel/plugin-transform-arrow-functions" "^7.12.1" + "@babel/plugin-transform-async-to-generator" "^7.12.1" + "@babel/plugin-transform-block-scoped-functions" "^7.12.1" + "@babel/plugin-transform-block-scoping" "^7.12.11" + "@babel/plugin-transform-classes" "^7.12.1" + "@babel/plugin-transform-computed-properties" "^7.12.1" + "@babel/plugin-transform-destructuring" "^7.12.1" + "@babel/plugin-transform-dotall-regex" "^7.12.1" + "@babel/plugin-transform-duplicate-keys" "^7.12.1" + "@babel/plugin-transform-exponentiation-operator" "^7.12.1" + "@babel/plugin-transform-for-of" "^7.12.1" + "@babel/plugin-transform-function-name" "^7.12.1" + "@babel/plugin-transform-literals" "^7.12.1" + "@babel/plugin-transform-member-expression-literals" "^7.12.1" + "@babel/plugin-transform-modules-amd" "^7.12.1" + "@babel/plugin-transform-modules-commonjs" "^7.12.1" + "@babel/plugin-transform-modules-systemjs" "^7.12.1" + "@babel/plugin-transform-modules-umd" "^7.12.1" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.12.1" + "@babel/plugin-transform-new-target" "^7.12.1" + "@babel/plugin-transform-object-super" "^7.12.1" + "@babel/plugin-transform-parameters" "^7.12.1" + "@babel/plugin-transform-property-literals" "^7.12.1" + "@babel/plugin-transform-regenerator" "^7.12.1" + "@babel/plugin-transform-reserved-words" "^7.12.1" + "@babel/plugin-transform-shorthand-properties" "^7.12.1" + "@babel/plugin-transform-spread" "^7.12.1" + "@babel/plugin-transform-sticky-regex" "^7.12.7" + "@babel/plugin-transform-template-literals" "^7.12.1" + "@babel/plugin-transform-typeof-symbol" "^7.12.10" + "@babel/plugin-transform-unicode-escapes" "^7.12.1" + "@babel/plugin-transform-unicode-regex" "^7.12.1" + "@babel/preset-modules" "^0.1.3" + "@babel/types" "^7.12.11" + core-js-compat "^3.8.0" + semver "^5.5.0" + +"@babel/preset-modules@^0.1.3": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.4.tgz#362f2b68c662842970fdb5e254ffc8fc1c2e415e" + integrity sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/register@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.12.10.tgz#19b87143f17128af4dbe7af54c735663b3999f60" + integrity sha512-EvX/BvMMJRAA3jZgILWgbsrHwBQvllC5T8B29McyME8DvkdOxk4ujESfrMvME8IHSDvWXrmMXxPvA/lx2gqPLQ== + dependencies: + find-cache-dir "^2.0.0" + lodash "^4.17.19" + make-dir "^2.1.0" + pirates "^4.0.0" + source-map-support "^0.5.16" + +"@babel/runtime@^7.8.4": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.10.4", "@babel/template@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" + integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.12.7" + "@babel/types" "^7.12.7" + +"@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" + integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== + dependencies: + "@babel/code-frame" "^7.12.11" + "@babel/generator" "^7.12.11" + "@babel/helper-function-name" "^7.12.11" + "@babel/helper-split-export-declaration" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/types" "^7.12.12" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + +"@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7", "@babel/types@^7.4.4": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + +"@dabh/diagnostics@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.2.tgz#290d08f7b381b8f94607dc8f471a12c675f9db31" + integrity sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q== + dependencies: + colorspace "1.1.x" + enabled "2.0.x" + kuler "^2.0.0" + +"@hapi/address@^2.1.2": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5" + integrity sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ== + +"@hapi/formula@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@hapi/formula/-/formula-1.2.0.tgz#994649c7fea1a90b91a0a1e6d983523f680e10cd" + integrity sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA== + +"@hapi/hoek@^8.2.4", "@hapi/hoek@^8.3.0": + version "8.5.1" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-8.5.1.tgz#fde96064ca446dec8c55a8c2f130957b070c6e06" + integrity sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow== + +"@hapi/hoek@^9.0.0": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.1.1.tgz#9daf5745156fd84b8e9889a2dc721f0c58e894aa" + integrity sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw== + +"@hapi/joi@^16.1.8": + version "16.1.8" + resolved "https://registry.yarnpkg.com/@hapi/joi/-/joi-16.1.8.tgz#84c1f126269489871ad4e2decc786e0adef06839" + integrity sha512-wAsVvTPe+FwSrsAurNt5vkg3zo+TblvC5Bb1zMVK6SJzZqw9UrJnexxR+76cpePmtUZKHAPxcQ2Bf7oVHyahhg== + dependencies: + "@hapi/address" "^2.1.2" + "@hapi/formula" "^1.2.0" + "@hapi/hoek" "^8.2.4" + "@hapi/pinpoint" "^1.0.2" + "@hapi/topo" "^3.1.3" + +"@hapi/pinpoint@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@hapi/pinpoint/-/pinpoint-1.0.2.tgz#025b7a36dbbf4d35bf1acd071c26b20ef41e0d13" + integrity sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ== + +"@hapi/topo@^3.1.3": + version "3.1.6" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-3.1.6.tgz#68d935fa3eae7fdd5ab0d7f953f3205d8b2bfc29" + integrity sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ== + dependencies: + "@hapi/hoek" "^8.3.0" + +"@hapi/topo@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@hapi/topo/-/topo-5.0.0.tgz#c19af8577fa393a06e9c77b60995af959be721e7" + integrity sha512-tFJlT47db0kMqVm3H4nQYgn6Pwg10GTZHb1pwmSiv1K4ks6drQOtfEF5ZnPjkvC+y4/bUPHK+bc87QvLcL+WMw== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@medusajs/medusa@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@medusajs/medusa/-/medusa-1.1.3.tgz#253cf73a45d066eb25cfa58efa81674a45759ef1" + integrity sha512-QSEe0fQuEndyJ7WUPKfaPYO5pCR5xNLT/6NAObgi2nuo4WroA2nqqU01bOuWf/Sa4PnH0YMtJ0H86qzLa0MARA== + dependencies: + "@babel/plugin-transform-classes" "^7.9.5" + "@hapi/joi" "^16.1.8" + awilix "^4.2.3" + body-parser "^1.19.0" + bull "^3.12.1" + chokidar "^3.4.2" + connect-redis "^5.0.0" + cookie-parser "^1.4.4" + core-js "^3.6.5" + cors "^2.8.5" + dotenv "^8.2.0" + express "^4.17.1" + express-session "^1.17.1" + fs-exists-cached "^1.0.0" + glob "^7.1.6" + ioredis "^4.17.3" + joi "^17.3.0" + joi-objectid "^3.0.1" + jsonwebtoken "^8.5.1" + medusa-core-utils "^1.1.0" + medusa-test-utils "^1.1.1" + morgan "^1.9.1" + multer "^1.4.2" + passport "^0.4.0" + passport-http-bearer "^1.0.1" + passport-jwt "^4.0.0" + passport-local "^1.0.0" + pg "^8.5.1" + randomatic "^3.1.1" + redis "^3.0.2" + reflect-metadata "^0.1.13" + request-ip "^2.1.3" + resolve-cwd "^3.0.0" + scrypt-kdf "^2.0.1" + typeorm "^0.2.29" + ulid "^2.3.0" + uuid "^8.3.1" + winston "^3.2.1" + +"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents": + version "2.1.8-no-fsevents" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.tgz#da7c3996b8e6e19ebd14d82eaced2313e7769f9b" + integrity sha512-+nb9vWloHNNMFHjGofEam3wopE3m1yuambrrd/fnPc+lFOMB9ROTqQlche9ByFWNkdNqfSgR/kkQtQ8DzEWt2w== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + +"@nodelib/fs.scandir@2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" + integrity sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA== + dependencies: + "@nodelib/fs.stat" "2.0.4" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.4", "@nodelib/fs.stat@^2.0.2": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz#a3f2dd61bab43b8db8fa108a121cfffe4c676655" + integrity sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz#cce9396b30aa5afe9e3756608f5831adcb53d063" + integrity sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== + dependencies: + "@nodelib/fs.scandir" "2.1.4" + fastq "^1.6.0" + +"@sideway/address@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.0.tgz#0b301ada10ac4e0e3fa525c90615e0b61a72b78d" + integrity sha512-wAH/JYRXeIFQRsxerIuLjgUu2Xszam+O5xKeatJ4oudShOOirfmsQ1D6LL54XOU2tizpCYku+s1wmU0SYdpoSA== + dependencies: + "@hapi/hoek" "^9.0.0" + +"@sideway/formula@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.0.tgz#fe158aee32e6bd5de85044be615bc08478a0a13c" + integrity sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg== + +"@sideway/pinpoint@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" + integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== + +"@sqltools/formatter@1.2.2": + version "1.2.2" + resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.2.tgz#9390a8127c0dcba61ebd7fdcc748655e191bdd68" + integrity sha512-/5O7Fq6Vnv8L6ucmPjaWbVG1XkP4FO+w5glqfkIsq3Xw4oyNAdJddbnYodNDAfjVUvo/rrSCTom4kAND7T1o5Q== + +"@types/fs-extra@^8.0.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.1.tgz#1e49f22d09aa46e19b51c0b013cb63d0d923a068" + integrity sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w== + dependencies: + "@types/node" "*" + +"@types/glob@^7.1.1": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" + integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + +"@types/node@*": + version "14.14.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" + integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== + +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +any-promise@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + +anymatch@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== + dependencies: + micromatch "^3.1.4" + normalize-path "^2.1.1" + +anymatch@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" + integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +app-root-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.0.0.tgz#210b6f43873227e18a4b810a032283311555d5ad" + integrity sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw== + +append-field@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-field/-/append-field-1.0.0.tgz#1e3440e915f0b1203d23748e78edd7b9b5b43e56" + integrity sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY= + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= + +arr-flatten@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== + +arr-union@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array-unique@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= + +assign-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= + +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" + integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== + +atob@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== + +awilix@^4.2.3: + version "4.3.1" + resolved "https://registry.yarnpkg.com/awilix/-/awilix-4.3.1.tgz#97ce812550b17f8a661d7966ae361d4bbf690174" + integrity sha512-J0AiqggtobprddFJTZKfg4ZXjKzfNhTorwIb0L4/jhSfab4L0Q30C3hfyiHYpcxgUbovsLMRej3ZxQ6hNdcfoA== + dependencies: + camel-case "^4.1.2" + glob "^7.1.6" + rollup-plugin-copy "^3.3.0" + +babel-plugin-dynamic-import-node@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" + integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== + dependencies: + object.assign "^4.1.0" + +babel-plugin-transform-typescript-metadata@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-typescript-metadata/-/babel-plugin-transform-typescript-metadata-0.3.1.tgz#d86599b7139131ba5e917f5f568d0c824a5cdfc3" + integrity sha512-thOuACZReULfLy7vh2o3/joYkkRerMKLBDmXy3ImCnkNUnxBmNw0uVa05JhhX0slluaEkio6OIFa7zPgaJdk6g== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +babel-preset-medusa-package@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/babel-preset-medusa-package/-/babel-preset-medusa-package-1.1.0.tgz#3b5a5fc5679a92747a5f13ab5419252b0de67b84" + integrity sha512-1rGnObrfr4WCcmYciovqn8JbwNq2KtbEho/acQAYIxl6G3LOODK/jBH2zQHeW5k4GxjVe72JZDdqjfdm88KmEw== + dependencies: + "@babel/plugin-proposal-class-properties" "^7.12.1" + "@babel/plugin-proposal-decorators" "^7.12.1" + "@babel/plugin-proposal-optional-chaining" "^7.12.1" + "@babel/plugin-transform-classes" "^7.12.1" + "@babel/plugin-transform-instanceof" "^7.12.1" + "@babel/plugin-transform-runtime" "^7.12.1" + "@babel/preset-env" "^7.12.7" + babel-plugin-transform-typescript-metadata "^0.3.1" + core-js "^3.7.0" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +base@^0.11.1: + version "0.11.2" + resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== + dependencies: + cache-base "^1.0.1" + class-utils "^0.3.5" + component-emitter "^1.2.1" + define-property "^1.0.0" + isobject "^3.0.1" + mixin-deep "^1.2.0" + pascalcase "^0.1.1" + +basic-auth@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" + integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== + dependencies: + safe-buffer "5.1.2" + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +body-parser@1.19.0, body-parser@^1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^2.3.1, braces@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== + dependencies: + arr-flatten "^1.1.0" + array-unique "^0.3.2" + extend-shallow "^2.0.1" + fill-range "^4.0.0" + isobject "^3.0.1" + repeat-element "^1.1.2" + snapdragon "^0.8.1" + snapdragon-node "^2.0.1" + split-string "^3.0.2" + to-regex "^3.0.1" + +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browserslist@^4.14.5, browserslist@^4.16.1: + version "4.16.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.1.tgz#bf757a2da376b3447b800a16f0f1c96358138766" + integrity sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA== + dependencies: + caniuse-lite "^1.0.30001173" + colorette "^1.2.1" + electron-to-chromium "^1.3.634" + escalade "^3.1.1" + node-releases "^1.1.69" + +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk= + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +buffer-writer@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04" + integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== + +buffer@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bull@^3.12.1: + version "3.20.0" + resolved "https://registry.yarnpkg.com/bull/-/bull-3.20.0.tgz#ca394d623f13ade6cddb7481f630988bce2d4d09" + integrity sha512-xXUfA2gLZLfIkWhxcZkAk6mHt+eG3o4arqz7HwCPVYuVjIp/pYTuhFd2iPXIQLxop7pJY4VIQ59fELdD/Y6f8w== + dependencies: + cron-parser "^2.13.0" + debuglog "^1.0.0" + get-port "^5.1.1" + ioredis "4.18.0" + lodash "^4.17.19" + p-timeout "^3.2.0" + promise.prototype.finally "^3.1.2" + semver "^7.3.2" + util.promisify "^1.0.1" + uuid "^8.3.0" + +busboy@^0.2.11: + version "0.2.14" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453" + integrity sha1-bCpiLvz0fFe7vh4qnDetNseSVFM= + dependencies: + dicer "0.2.5" + readable-stream "1.1.x" + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +cache-base@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== + dependencies: + collection-visit "^1.0.0" + component-emitter "^1.2.1" + get-value "^2.0.6" + has-value "^1.0.0" + isobject "^3.0.1" + set-value "^2.0.0" + to-object-path "^0.3.0" + union-value "^1.0.0" + unset-value "^1.0.0" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +camel-case@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a" + integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== + dependencies: + pascal-case "^3.1.2" + tslib "^2.0.3" + +caniuse-lite@^1.0.30001173: + version "1.0.30001181" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001181.tgz#4f0e5184e1ea7c3bf2727e735cbe7ca9a451d673" + integrity sha512-m5ul/ARCX50JB8BSNM+oiPmQrR5UmngaQ3QThTTp5HcIIQGP/nPBs82BYLE+tigzm3VW+F4BJIhUyaVtEweelQ== + +chalk@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0, chalk@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chokidar@^3.4.0, chokidar@^3.4.2: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.3.1" + +class-utils@^0.3.5: + version "0.3.6" + resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== + dependencies: + arr-union "^3.1.0" + define-property "^0.2.5" + isobject "^3.0.0" + static-extend "^0.1.1" + +cli-highlight@^2.1.10: + version "2.1.10" + resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-2.1.10.tgz#26a087da9209dce4fcb8cf5427dc97cd96ac173a" + integrity sha512-CcPFD3JwdQ2oSzy+AMG6j3LRTkNjM82kzcSKzoVw6cLanDCJNlsLjeqVTOTfOfucnWv5F0rmBemVf1m9JiIasw== + dependencies: + chalk "^4.0.0" + highlight.js "^10.0.0" + mz "^2.4.0" + parse5 "^5.1.1" + parse5-htmlparser2-tree-adapter "^6.0.0" + yargs "^16.0.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +cluster-key-slot@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.0.tgz#30474b2a981fb12172695833052bc0d01336d10d" + integrity sha512-2Nii8p3RwAPiFwsnZvukotvow2rIHM+yQ6ZcBXGHdniadkYGZYiGmkHJIbZPIV9nfv7m/U1IPMVVcAhoWFeklw== + +collection-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= + dependencies: + map-visit "^1.0.0" + object-visit "^1.0.0" + +color-convert@^1.9.0, color-convert@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@^1.0.0, color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +color-string@^1.5.2: + version "1.5.4" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.4.tgz#dd51cd25cfee953d138fe4002372cc3d0e504cb6" + integrity sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/color/-/color-3.0.0.tgz#d920b4328d534a3ac8295d68f7bd4ba6c427be9a" + integrity sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w== + dependencies: + color-convert "^1.9.1" + color-string "^1.5.2" + +colorette@^1.1.0, colorette@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" + integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== + +colors@^1.2.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +colorspace@1.1.x: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.2.tgz#e0128950d082b86a2168580796a0aa5d6c68d8c5" + integrity sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ== + dependencies: + color "3.0.x" + text-hex "1.0.x" + +commander@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +component-emitter@^1.2.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" + integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +concat-stream@^1.5.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +connect-redis@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/connect-redis/-/connect-redis-5.0.0.tgz#68fe890117e761ee98e13a14b835338bd6bf044c" + integrity sha512-R4nTW5uXeG5s6zr/q4abmtcdloglZrL/A3cpa0JU0RLFJU4mTR553HUY8OZ0ngeySkGDclwQ5xmCcjjKkxdOSg== + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@^1.1.0, convert-source-map@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" + integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== + dependencies: + safe-buffer "~5.1.1" + +cookie-parser@^1.4.4: + version "1.4.5" + resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.5.tgz#3e572d4b7c0c80f9c61daf604e4336831b5d1d49" + integrity sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw== + dependencies: + cookie "0.4.0" + cookie-signature "1.0.6" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +copy-descriptor@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= + +core-js-compat@^3.8.0: + version "3.8.3" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.8.3.tgz#9123fb6b9cad30f0651332dc77deba48ef9b0b3f" + integrity sha512-1sCb0wBXnBIL16pfFG1Gkvei6UzvKyTNYpiC41yrdjEv0UoJoq9E/abTMzyYJ6JpTkAj15dLjbqifIzEBDVvog== + dependencies: + browserslist "^4.16.1" + semver "7.0.0" + +core-js@^3.2.1, core-js@^3.6.5, core-js@^3.7.0: + version "3.8.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.8.3.tgz#c21906e1f14f3689f93abcc6e26883550dd92dd0" + integrity sha512-KPYXeVZYemC2TkNEkX/01I+7yd+nX3KddKwZ1Ww7SKWdI2wQprSgLmrTddT8nw92AjEklTsPBoSdQBhbI1bQ6Q== + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cors@^2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +cron-parser@^2.13.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-2.18.0.tgz#de1bb0ad528c815548371993f81a54e5a089edcf" + integrity sha512-s4odpheTyydAbTBQepsqd2rNWGa2iV3cyo8g7zbI2QQYGLVsfbhmwukayS1XHppe02Oy1fg7mg6xoaraVJeEcg== + dependencies: + is-nan "^1.3.0" + moment-timezone "^0.5.31" + +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^4.1.0, debug@^4.1.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +debuglog@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" + integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +define-property@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= + dependencies: + is-descriptor "^0.1.0" + +define-property@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= + dependencies: + is-descriptor "^1.0.0" + +define-property@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== + dependencies: + is-descriptor "^1.0.2" + isobject "^3.0.1" + +denque@^1.1.0, denque@^1.4.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/denque/-/denque-1.5.0.tgz#773de0686ff2d8ec2ff92914316a47b73b1c73de" + integrity sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ== + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +depd@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +dicer@0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f" + integrity sha1-WZbAhrszIYyBLAkL3cCc0S+stw8= + dependencies: + readable-stream "1.1.x" + streamsearch "0.1.2" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +dotenv@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" + integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== + +ecdsa-sig-formatter@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.634: + version "1.3.648" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.648.tgz#b05926eca1843c04b283e682a1fc6c10af7e9dda" + integrity sha512-4POzwyQ80tkDiBwkxn7IpfzioimrjRSFX1sCQ3pLZsYJ5ERYmwzdq0hZZ3nFP7Z6GtmnSn3xwWDm8FPlMeOoEQ== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enabled@2.0.x: + version "2.0.0" + resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" + integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +es-abstract@^1.17.0-next.0: + version "1.17.7" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.7.tgz#a4de61b2f66989fc7421676c1cb9787573ace54c" + integrity sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== + dependencies: + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.2" + is-regex "^1.1.1" + object-inspect "^1.8.0" + object-keys "^1.1.1" + object.assign "^4.1.1" + string.prototype.trimend "^1.0.1" + string.prototype.trimstart "^1.0.1" + +es-abstract@^1.18.0-next.1: + version "1.18.0-next.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0-next.2.tgz#088101a55f0541f595e7e057199e27ddc8f3a5c2" + integrity sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + has "^1.0.3" + has-symbols "^1.0.1" + is-callable "^1.2.2" + is-negative-zero "^2.0.1" + is-regex "^1.1.1" + object-inspect "^1.9.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.3" + string.prototype.trimstart "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +expand-brackets@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= + dependencies: + debug "^2.3.3" + define-property "^0.2.5" + extend-shallow "^2.0.1" + posix-character-classes "^0.1.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +express-session@^1.17.1: + version "1.17.1" + resolved "https://registry.yarnpkg.com/express-session/-/express-session-1.17.1.tgz#36ecbc7034566d38c8509885c044d461c11bf357" + integrity sha512-UbHwgqjxQZJiWRTMyhvWGvjBQduGCSBDhhZXYenziMFjxst5rMV+aJZ6hKPHZnPyHGsrqRICxtX8jtEbm/z36Q== + dependencies: + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~2.0.0" + on-headers "~1.0.2" + parseurl "~1.3.3" + safe-buffer "5.2.0" + uid-safe "~2.1.5" + +express@^4.17.1: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= + dependencies: + is-extendable "^0.1.0" + +extend-shallow@^3.0.0, extend-shallow@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= + dependencies: + assign-symbols "^1.0.0" + is-extendable "^1.0.1" + +extglob@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== + dependencies: + array-unique "^0.3.2" + define-property "^1.0.0" + expand-brackets "^2.1.4" + extend-shallow "^2.0.1" + fragment-cache "^0.2.1" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +fast-glob@^3.0.3: + version "3.2.5" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.5.tgz#7939af2a656de79a4f1901903ee8adcaa7cb9661" + integrity sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + +fast-safe-stringify@^2.0.4: + version "2.0.7" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" + integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== + +fastq@^1.6.0: + version "1.10.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.10.1.tgz#8b8f2ac8bf3632d67afcd65dac248d5fdc45385e" + integrity sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA== + dependencies: + reusify "^1.0.4" + +fecha@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.0.tgz#3ffb6395453e3f3efff850404f0a59b6747f5f41" + integrity sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg== + +figlet@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.0.tgz#2db4d00a584e5155a96080632db919213c3e003c" + integrity sha512-ZQJM4aifMpz6H19AW1VqvZ7l4pOE9p7i/3LyxgO2kp+PO/VcDYNqIHEMtkccqIhTXMKci4kjueJr/iCQEaT/Ww== + +fill-range@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= + dependencies: + extend-shallow "^2.0.1" + is-number "^3.0.0" + repeat-string "^1.6.1" + to-regex-range "^2.1.0" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +fn.name@1.x.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" + integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +for-in@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= + +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + +fragment-cache@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= + dependencies: + map-cache "^0.2.2" + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fs-exists-cached@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz#cf25554ca050dc49ae6656b41de42258989dcbce" + integrity sha1-zyVVTKBQ3EmuZla0HeQiWJidy84= + +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" + integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +gensync@^1.0.0-beta.1: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.0.tgz#892e62931e6938c8a23ea5aaebcfb67bd97da97e" + integrity sha512-M11rgtQp5GZMZzDL7jLTNxbDfurpzuau5uqRWDPvlHjfvg3TdScAZo96GLvhMjImrmR8uAt0FS2RLoMrfWGKlg== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-port@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" + integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== + +get-value@^2.0.3, get-value@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= + +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.1.0, glob-parent@~5.1.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + +glob@^7.0.0, glob@^7.1.3, glob@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globby@10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" + integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + +graceful-fs@^4.1.11, graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.4" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" + integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= + dependencies: + ansi-regex "^2.0.0" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" + integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + +has-value@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= + dependencies: + get-value "^2.0.3" + has-values "^0.1.4" + isobject "^2.0.0" + +has-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= + dependencies: + get-value "^2.0.6" + has-values "^1.0.0" + isobject "^3.0.0" + +has-values@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= + +has-values@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= + dependencies: + is-number "^3.0.0" + kind-of "^4.0.0" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +highlight.js@^10.0.0: + version "10.5.0" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.5.0.tgz#3f09fede6a865757378f2d9ebdcbc15ba268f98f" + integrity sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw== + +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^5.1.1: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ioredis@4.18.0: + version "4.18.0" + resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-4.18.0.tgz#40785bb76d30b2a50698dd9bb8d8add2a88fbef7" + integrity sha512-wXlB60wD+ayJxbD7t+RFBanXinhHyYpfKUxTEEXNOpd0wb+nC8GLH2r7SaZ6sSBOxr8x6jDfBiuMaiK3bPYABw== + dependencies: + cluster-key-slot "^1.1.0" + debug "^4.1.1" + denque "^1.1.0" + lodash.defaults "^4.2.0" + lodash.flatten "^4.4.0" + redis-commands "1.6.0" + redis-errors "^1.2.0" + redis-parser "^3.0.0" + standard-as-callback "^2.0.1" + +ioredis@^4.17.3: + version "4.19.4" + resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-4.19.4.tgz#11112005f87ad3acac247ada3b22eb31b947f7c7" + integrity sha512-3haQWw9dpEjcfVcRktXlayVNrrqvvc2io7Q/uiV2UsYw8/HC2YwwJr78Wql7zu5bzwci0x9bZYA69U7KkevAvw== + dependencies: + cluster-key-slot "^1.1.0" + debug "^4.1.1" + denque "^1.1.0" + lodash.defaults "^4.2.0" + lodash.flatten "^4.4.0" + p-map "^2.1.0" + redis-commands "1.6.0" + redis-errors "^1.2.0" + redis-parser "^3.0.0" + standard-as-callback "^2.0.1" + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-accessor-descriptor@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= + dependencies: + kind-of "^3.0.2" + +is-accessor-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + dependencies: + kind-of "^6.0.0" + +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.2.tgz#c7c6715cd22d4ddb48d3e19970223aceabb080d9" + integrity sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== + +is-data-descriptor@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= + dependencies: + kind-of "^3.0.2" + +is-data-descriptor@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== + dependencies: + kind-of "^6.0.0" + +is-date-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" + integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + +is-descriptor@^0.1.0: + version "0.1.6" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== + dependencies: + is-accessor-descriptor "^0.1.6" + is-data-descriptor "^0.1.4" + kind-of "^5.0.0" + +is-descriptor@^1.0.0, is-descriptor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== + dependencies: + is-accessor-descriptor "^1.0.0" + is-data-descriptor "^1.0.0" + kind-of "^6.0.2" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= + +is-extendable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== + dependencies: + is-plain-object "^2.0.4" + +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-nan@^1.3.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" + integrity sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-object@^2.0.3, is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-plain-object@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" + integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g== + +is-regex@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.1.tgz#c6f98aacc546f6cec5468a07b7b153ab564a57b9" + integrity sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== + dependencies: + has-symbols "^1.0.1" + +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + +is-symbol@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" + integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + dependencies: + has-symbols "^1.0.1" + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +is_js@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/is_js/-/is_js-0.9.0.tgz#0ab94540502ba7afa24c856aa985561669e9c52d" + integrity sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0= + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= + dependencies: + isarray "1.0.0" + +isobject@^3.0.0, isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +joi-objectid@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/joi-objectid/-/joi-objectid-3.0.1.tgz#63ace7860f8e1a993a28d40c40ffd8eff01a3668" + integrity sha512-V/3hbTlGpvJ03Me6DJbdBI08hBTasFOmipsauOsxOSnsF1blxV537WTl1zPwbfcKle4AK0Ma4OPnzMH4LlvTpQ== + +joi@^17.3.0: + version "17.3.0" + resolved "https://registry.yarnpkg.com/joi/-/joi-17.3.0.tgz#f1be4a6ce29bc1716665819ac361dfa139fff5d2" + integrity sha512-Qh5gdU6niuYbUIUV5ejbsMiiFmBdw8Kcp8Buj2JntszCkCfxJ9Cz76OtHxOZMPXrt5810iDIXs+n1nNVoquHgg== + dependencies: + "@hapi/hoek" "^9.0.0" + "@hapi/topo" "^5.0.0" + "@sideway/address" "^4.1.0" + "@sideway/formula" "^3.0.0" + "@sideway/pinpoint" "^2.0.0" + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.14.0: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + +json5@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" + integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== + dependencies: + minimist "^1.2.5" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonwebtoken@^8.2.0, jsonwebtoken@^8.5.1: + version "8.5.1" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" + integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^5.6.0" + +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + +kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= + dependencies: + is-buffer "^1.1.5" + +kind-of@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= + dependencies: + is-buffer "^1.1.5" + +kind-of@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== + +kind-of@^6.0.0, kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +kuler@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" + integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +lodash.defaults@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" + integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= + +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8= + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY= + +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha1-YZwK89A/iwTDH1iChAt3sRzWg0M= + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w= + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= + +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= + +lodash@^4.17.19: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + +logform@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.2.0.tgz#40f036d19161fc76b68ab50fdc7fe495544492f2" + integrity sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg== + dependencies: + colors "^1.2.1" + fast-safe-stringify "^2.0.4" + fecha "^4.2.0" + ms "^2.1.1" + triple-beam "^1.3.0" + +lower-case@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28" + integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== + dependencies: + tslib "^2.0.3" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +map-cache@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= + +map-visit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= + dependencies: + object-visit "^1.0.0" + +math-random@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c" + integrity sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A== + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +medusa-core-utils@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/medusa-core-utils/-/medusa-core-utils-1.1.0.tgz#0641b365b769dbf99856025d935eef5cf5d81f2c" + integrity sha512-zocRthKhLK3eSjrXbAhZZkIMBRxyvU7GcAMFh5UCEgfe7f935vjE7r5lGTr5jTEwgwaoTUk9ep0VBekz0SEdyw== + dependencies: + joi "^17.3.0" + joi-objectid "^3.0.1" + +medusa-interfaces@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/medusa-interfaces/-/medusa-interfaces-1.1.0.tgz#fdced50c2aac5956b4a40da34841df60a96d16c4" + integrity sha512-wSgHR/MYGJzj6y54u25v7lGX8gTaAJarwN2VIHDTn0lsVGlIPqJem+tbJkDLdUV7V5mERSq5FGoqnIFHeJaDgQ== + dependencies: + medusa-core-utils "^1.1.0" + +medusa-test-utils@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/medusa-test-utils/-/medusa-test-utils-1.1.1.tgz#e6c9faf9339a2fa22f162c9864091d6e12792215" + integrity sha512-Fx55x1widi9yz3tQSvQbkACyNZMu05j9q9Ta0eDWwb1q96RpTQg0BMc0Em+ZXE9EwxWHqgDUqlAfLGmCW6aQUg== + dependencies: + "@babel/plugin-transform-classes" "^7.9.5" + medusa-core-utils "^1.1.0" + randomatic "^3.1.1" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge2@^1.2.3, merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^3.1.10, micromatch@^3.1.4: + version "3.1.10" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + braces "^2.3.1" + define-property "^2.0.2" + extend-shallow "^3.0.2" + extglob "^2.0.4" + fragment-cache "^0.2.1" + kind-of "^6.0.2" + nanomatch "^1.2.9" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.2" + +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +mime-db@1.45.0: + version "1.45.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea" + integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w== + +mime-types@~2.1.24: + version "2.1.28" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd" + integrity sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ== + dependencies: + mime-db "1.45.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +mixin-deep@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== + dependencies: + for-in "^1.0.2" + is-extendable "^1.0.1" + +mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +moment-timezone@^0.5.31: + version "0.5.32" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.32.tgz#db7677cc3cc680fd30303ebd90b0da1ca0dfecc2" + integrity sha512-Z8QNyuQHQAmWucp8Knmgei8YNo28aLjJq6Ma+jy1ZSpSk5nyfRT8xgUbSQvD2+2UajISfenndwvFuH3NGS+nvA== + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0": + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + +morgan@^1.9.1: + version "1.10.0" + resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7" + integrity sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ== + dependencies: + basic-auth "~2.0.1" + debug "2.6.9" + depd "~2.0.0" + on-finished "~2.3.0" + on-headers "~1.0.2" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multer@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/multer/-/multer-1.4.2.tgz#2f1f4d12dbaeeba74cb37e623f234bf4d3d2057a" + integrity sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg== + dependencies: + append-field "^1.0.0" + busboy "^0.2.11" + concat-stream "^1.5.2" + mkdirp "^0.5.1" + object-assign "^4.1.1" + on-finished "^2.3.0" + type-is "^1.6.4" + xtend "^4.0.0" + +mz@^2.4.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + +nanomatch@^1.2.9: + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== + dependencies: + arr-diff "^4.0.0" + array-unique "^0.3.2" + define-property "^2.0.2" + extend-shallow "^3.0.2" + fragment-cache "^0.2.1" + is-windows "^1.0.2" + kind-of "^6.0.2" + object.pick "^1.3.0" + regex-not "^1.0.0" + snapdragon "^0.8.1" + to-regex "^3.0.1" + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +no-case@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d" + integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== + dependencies: + lower-case "^2.0.2" + tslib "^2.0.3" + +node-environment-flags@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + +node-releases@^1.1.69: + version "1.1.70" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.70.tgz#66e0ed0273aa65666d7fe78febe7634875426a08" + integrity sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw== + +normalize-path@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-copy@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= + dependencies: + copy-descriptor "^0.1.0" + define-property "^0.2.5" + kind-of "^3.0.3" + +object-inspect@^1.8.0, object-inspect@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.9.0.tgz#c90521d74e1127b67266ded3394ad6116986533a" + integrity sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== + +object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object-visit@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= + dependencies: + isobject "^3.0.0" + +object.assign@^4.1.0, object.assign@^4.1.1, object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz#0dfda8d108074d9c563e80490c883b6661091544" + integrity sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + +object.pick@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= + dependencies: + isobject "^3.0.1" + +on-finished@^2.3.0, on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +one-time@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45" + integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g== + dependencies: + fn.name "1.x.x" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-map@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== + +p-timeout@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" + integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== + dependencies: + p-finally "^1.0.0" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +packet-reader@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" + integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== + +parent-require@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parent-require/-/parent-require-1.0.0.tgz#746a167638083a860b0eef6732cb27ed46c32977" + integrity sha1-dGoWdjgIOoYLDu9nMssn7UbDKXc= + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + +parse5-htmlparser2-tree-adapter@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" + integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== + dependencies: + parse5 "^6.0.1" + +parse5@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.1.tgz#f68e4e5ba1852ac2cadc00f4555fff6c2abb6178" + integrity sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug== + +parse5@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +pascal-case@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb" + integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== + dependencies: + no-case "^3.0.4" + tslib "^2.0.3" + +pascalcase@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= + +passport-http-bearer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/passport-http-bearer/-/passport-http-bearer-1.0.1.tgz#147469ea3669e2a84c6167ef99dbb77e1f0098a8" + integrity sha1-FHRp6jZp4qhMYWfvmdu3fh8AmKg= + dependencies: + passport-strategy "1.x.x" + +passport-jwt@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/passport-jwt/-/passport-jwt-4.0.0.tgz#7f0be7ba942e28b9f5d22c2ebbb8ce96ef7cf065" + integrity sha512-BwC0n2GP/1hMVjR4QpnvqA61TxenUMlmfNjYNgK0ZAs0HK4SOQkHcSv4L328blNTLtHq7DbmvyNJiH+bn6C5Mg== + dependencies: + jsonwebtoken "^8.2.0" + passport-strategy "^1.0.0" + +passport-local@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/passport-local/-/passport-local-1.0.0.tgz#1fe63268c92e75606626437e3b906662c15ba6ee" + integrity sha1-H+YyaMkudWBmJkN+O5BmYsFbpu4= + dependencies: + passport-strategy "1.x.x" + +passport-strategy@1.x.x, passport-strategy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/passport-strategy/-/passport-strategy-1.0.0.tgz#b5539aa8fc225a3d1ad179476ddf236b440f52e4" + integrity sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ= + +passport@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/passport/-/passport-0.4.1.tgz#941446a21cb92fc688d97a0861c38ce9f738f270" + integrity sha512-IxXgZZs8d7uFSt3eqNjM9NQ3g3uQCW5avD8mRNoXV99Yig50vjuaez6dQK2qC0kVWPRTujxY0dWgGfT09adjYg== + dependencies: + passport-strategy "1.x.x" + pause "0.0.1" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pause@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/pause/-/pause-0.0.1.tgz#1d408b3fdb76923b9543d96fb4c9dfd535d9cb5d" + integrity sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10= + +pg-connection-string@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.4.0.tgz#c979922eb47832999a204da5dbe1ebf2341b6a10" + integrity sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ== + +pg-int8@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" + integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== + +pg-pool@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.2.2.tgz#a560e433443ed4ad946b84d774b3f22452694dff" + integrity sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA== + +pg-protocol@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.4.0.tgz#43a71a92f6fe3ac559952555aa3335c8cb4908be" + integrity sha512-El+aXWcwG/8wuFICMQjM5ZSAm6OWiJicFdNYo+VY3QP+8vI4SvLIWVe51PppTzMhikUJR+PsyIFKqfdXPz/yxA== + +pg-types@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" + integrity sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA== + dependencies: + pg-int8 "1.0.1" + postgres-array "~2.0.0" + postgres-bytea "~1.0.0" + postgres-date "~1.0.4" + postgres-interval "^1.1.0" + +pg@^8.5.1: + version "8.5.1" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.5.1.tgz#34dcb15f6db4a29c702bf5031ef2e1e25a06a120" + integrity sha512-9wm3yX9lCfjvA98ybCyw2pADUivyNWT/yIP4ZcDVpMN0og70BUWYEGXPCTAQdGTAqnytfRADb7NERrY1qxhIqw== + dependencies: + buffer-writer "2.0.0" + packet-reader "1.0.0" + pg-connection-string "^2.4.0" + pg-pool "^3.2.2" + pg-protocol "^1.4.0" + pg-types "^2.1.0" + pgpass "1.x" + +pgpass@1.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.4.tgz#85eb93a83800b20f8057a2b029bf05abaf94ea9c" + integrity sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w== + dependencies: + split2 "^3.1.1" + +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pirates@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.0.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +posix-character-classes@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= + +postgres-array@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" + integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== + +postgres-bytea@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" + integrity sha1-AntTPAqokOJtFy1Hz5zOzFIazTU= + +postgres-date@~1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" + integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== + +postgres-interval@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" + integrity sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== + dependencies: + xtend "^4.0.0" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +promise.prototype.finally@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.2.tgz#b8af89160c9c673cefe3b4c4435b53cfd0287067" + integrity sha512-A2HuJWl2opDH0EafgdjwEw7HysI8ff/n4lW4QEVBCUXFk9QeGecBWv0Deph0UmLe3tTNYegz8MOjsVuE6SMoJA== + dependencies: + define-properties "^1.1.3" + es-abstract "^1.17.0-next.0" + function-bind "^1.1.1" + +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +random-bytes@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/random-bytes/-/random-bytes-1.0.0.tgz#4f68a1dc0ae58bd3fb95848c30324db75d64360b" + integrity sha1-T2ih3Arli9P7lYSMMDJNt11kNgs= + +randomatic@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readable-stream@1.1.x: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.2, readable-stream@^2.2.2, readable-stream@^2.3.7: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.0.0, readable-stream@^3.4.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + +redis-commands@1.6.0, redis-commands@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.6.0.tgz#36d4ca42ae9ed29815cdb30ad9f97982eba1ce23" + integrity sha512-2jnZ0IkjZxvguITjFTrGiLyzQZcTvaw8DAaCXxZq/dsHXz7KfMQ3OUJy7Tz9vnRtZRVz6VRCPDvruvU8Ts44wQ== + +redis-errors@^1.0.0, redis-errors@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/redis-errors/-/redis-errors-1.2.0.tgz#eb62d2adb15e4eaf4610c04afe1529384250abad" + integrity sha1-62LSrbFeTq9GEMBK/hUpOEJQq60= + +redis-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/redis-parser/-/redis-parser-3.0.0.tgz#b66d828cdcafe6b4b8a428a7def4c6bcac31c8b4" + integrity sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ= + dependencies: + redis-errors "^1.0.0" + +redis@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/redis/-/redis-3.0.2.tgz#bd47067b8a4a3e6a2e556e57f71cc82c7360150a" + integrity sha512-PNhLCrjU6vKVuMOyFu7oSP296mwBkcE6lrAjruBYG5LgdSqtRBoVQIylrMyVZD/lkF24RSNNatzvYag6HRBHjQ== + dependencies: + denque "^1.4.1" + redis-commands "^1.5.0" + redis-errors "^1.2.0" + redis-parser "^3.0.0" + +reflect-metadata@^0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08" + integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== + +regenerate-unicode-properties@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" + integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.2" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" + integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== + +regenerator-runtime@^0.13.4: + version "0.13.7" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz#cac2dacc8a1ea675feaabaeb8ae833898ae46f55" + integrity sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== + +regenerator-transform@^0.14.2: + version "0.14.5" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.5.tgz#c98da154683671c9c4dcb16ece736517e1b7feb4" + integrity sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== + dependencies: + "@babel/runtime" "^7.8.4" + +regex-not@^1.0.0, regex-not@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== + dependencies: + extend-shallow "^3.0.2" + safe-regex "^1.1.0" + +regexpu-core@^4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.1.tgz#2dea5a9a07233298fbf0db91fa9abc4c6e0f8ad6" + integrity sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.2.0" + regjsgen "^0.5.1" + regjsparser "^0.6.4" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.2.0" + +regjsgen@^0.5.1: + version "0.5.2" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.2.tgz#92ff295fb1deecbf6ecdab2543d207e91aa33733" + integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== + +regjsparser@^0.6.4: + version "0.6.6" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.6.tgz#6d8c939d1a654f78859b08ddcc4aa777f3fa800a" + integrity sha512-jjyuCp+IEMIm3N1H1LLTJW1EISEJV9+5oHdEyrt43Pg9cDSb6rrLZei2cVWpl0xTjmmlpec/lEQGYgM7xfpGCQ== + dependencies: + jsesc "~0.5.0" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= + +repeat-element@^1.1.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== + +repeat-string@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= + +request-ip@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/request-ip/-/request-ip-2.1.3.tgz#99ab2bafdeaf2002626e28083cb10597511d9e14" + integrity sha512-J3qdE/IhVM3BXkwMIVO4yFrvhJlU3H7JH16+6yHucadT4fePnR8dyh+vEs6FIx0S2x5TCt2ptiPfHcn0sqhbYQ== + dependencies: + is_js "^0.9.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +resolve-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" + integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== + dependencies: + resolve-from "^5.0.0" + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve-url@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= + +ret@~0.1.10: + version "0.1.15" + resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rollup-plugin-copy@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-copy/-/rollup-plugin-copy-3.3.0.tgz#5ba230047f86b9f703a29288f242948a5580e7b9" + integrity sha512-euDjCUSBXZa06nqnwCNADbkAcYDfzwowfZQkto9K/TFhiH+QG7I4PUsEMwM9tDgomGWJc//z7KLW8t+tZwxADA== + dependencies: + "@types/fs-extra" "^8.0.1" + colorette "^1.1.0" + fs-extra "^8.1.0" + globby "10.0.1" + is-plain-object "^3.0.0" + +run-parallel@^1.1.9: + version "1.1.10" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" + integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +safe-buffer@^5.0.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-regex@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= + dependencies: + ret "~0.1.10" + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@>=0.6.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +scrypt-kdf@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/scrypt-kdf/-/scrypt-kdf-2.0.1.tgz#3355224c52d398331b2cbf2b70a7be26b52c53e6" + integrity sha512-dMhpgBVJPDWZP5erOCwTjI6oAO9hKhFAjZsdSQ0spaWJYHuA/wFNF2weQQfsyCIk8eNKoLfEDxr3zAtM+gZo0Q== + +semver@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" + integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== + +semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^7.3.2: + version "7.3.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" + integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== + dependencies: + lru-cache "^6.0.0" + +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +set-value@^2.0.0, set-value@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" + integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== + dependencies: + extend-shallow "^2.0.1" + is-extendable "^0.1.1" + is-plain-object "^2.0.3" + split-string "^3.0.1" + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +sha.js@^2.4.11: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +snapdragon-node@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== + dependencies: + define-property "^1.0.0" + isobject "^3.0.0" + snapdragon-util "^3.0.1" + +snapdragon-util@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== + dependencies: + kind-of "^3.2.0" + +snapdragon@^0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== + dependencies: + base "^0.11.1" + debug "^2.2.0" + define-property "^0.2.5" + extend-shallow "^2.0.1" + map-cache "^0.2.2" + source-map "^0.5.6" + source-map-resolve "^0.5.0" + use "^3.1.0" + +source-map-resolve@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" + integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== + dependencies: + atob "^2.1.2" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + +source-map-support@^0.5.16: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-url@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= + +source-map@^0.5.0, source-map@^0.5.6: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +split-string@^3.0.1, split-string@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== + dependencies: + extend-shallow "^3.0.0" + +split2@^3.1.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= + +standard-as-callback@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/standard-as-callback/-/standard-as-callback-2.0.1.tgz#ed8bb25648e15831759b6023bdb87e6b60b38126" + integrity sha512-NQOxSeB8gOI5WjSaxjBgog2QFw55FV8TkS6Y07BiB3VJ8xNTvUYm0wl0s8ObgQ5NhdpnNfigMIKjgPESzgr4tg== + +static-extend@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= + dependencies: + define-property "^0.2.5" + object-copy "^0.1.0" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +streamsearch@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" + integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5" + integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.1, string.prototype.trimend@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz#a22bd53cca5c7cf44d7c9d5c732118873d6cd18b" + integrity sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.1, string.prototype.trimstart@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz#9b4cb590e123bb36564401d59824298de50fd5aa" + integrity sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= + dependencies: + ansi-regex "^2.0.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +text-hex@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" + integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== + +thenify-all@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.1" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.1.tgz#8932e686a4066038a016dd9e2ca46add9838a95f" + integrity sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw== + dependencies: + any-promise "^1.0.0" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-object-path@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= + dependencies: + kind-of "^3.0.2" + +to-regex-range@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= + dependencies: + is-number "^3.0.0" + repeat-string "^1.6.1" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +to-regex@^3.0.1, to-regex@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + dependencies: + define-property "^2.0.2" + extend-shallow "^3.0.2" + regex-not "^1.0.2" + safe-regex "^1.1.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +triple-beam@^1.2.0, triple-beam@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" + integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== + +tslib@^1.13.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + +type-is@^1.6.4, type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +typeorm@^0.2.29: + version "0.2.30" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.30.tgz#a0df2256402cbcdde8049a244437560495ce9b38" + integrity sha512-qpr8AO3Phi6ZF7qMHOrRdNisVt8jE1KfmW0ooLFcXscA87aJ12aBPyB9cJfxGNjNwd7B3WIK9ZlBveWiqd74QA== + dependencies: + "@sqltools/formatter" "1.2.2" + app-root-path "^3.0.0" + buffer "^5.5.0" + chalk "^4.1.0" + cli-highlight "^2.1.10" + debug "^4.1.1" + dotenv "^8.2.0" + glob "^7.1.6" + js-yaml "^3.14.0" + mkdirp "^1.0.4" + reflect-metadata "^0.1.13" + sha.js "^2.4.11" + tslib "^1.13.0" + xml2js "^0.4.23" + yargonaut "^1.1.2" + yargs "^16.0.3" + +uid-safe@~2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.5.tgz#2b3d5c7240e8fc2e58f8aa269e5ee49c0857bd3a" + integrity sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA== + dependencies: + random-bytes "~1.0.0" + +ulid@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/ulid/-/ulid-2.3.0.tgz#93063522771a9774121a84d126ecd3eb9804071f" + integrity sha512-keqHubrlpvT6G2wH0OEfSW4mquYRcbe/J8NMmveoQOjUqmo+hXtO+ORCpWhdbZ7k72UtY61BL7haGxW6enBnjw== + +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" + integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" + integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== + +union-value@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" + integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== + dependencies: + arr-union "^3.1.0" + get-value "^2.0.6" + is-extendable "^0.1.1" + set-value "^2.0.1" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +unset-value@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= + dependencies: + has-value "^0.3.1" + isobject "^3.0.0" + +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + +urix@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= + +use@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" + integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@^8.3.0, uuid@^8.3.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8flags@^3.1.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" + integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== + dependencies: + homedir-polyfill "^1.0.1" + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +winston-transport@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.4.0.tgz#17af518daa690d5b2ecccaa7acf7b20ca7925e59" + integrity sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw== + dependencies: + readable-stream "^2.3.7" + triple-beam "^1.2.0" + +winston@^3.2.1: + version "3.3.3" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.3.3.tgz#ae6172042cafb29786afa3d09c8ff833ab7c9170" + integrity sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw== + dependencies: + "@dabh/diagnostics" "^2.0.2" + async "^3.1.0" + is-stream "^2.0.0" + logform "^2.2.0" + one-time "^1.0.0" + readable-stream "^3.4.0" + stack-trace "0.0.x" + triple-beam "^1.3.0" + winston-transport "^4.4.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xml2js@^0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" + integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== + dependencies: + sax ">=0.6.0" + xmlbuilder "~11.0.0" + +xmlbuilder@~11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" + integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== + +xtend@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +y18n@^5.0.5: + version "5.0.5" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.5.tgz#8769ec08d03b1ea2df2500acef561743bbb9ab18" + integrity sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargonaut@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/yargonaut/-/yargonaut-1.1.4.tgz#c64f56432c7465271221f53f5cc517890c3d6e0c" + integrity sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA== + dependencies: + chalk "^1.1.1" + figlet "^1.1.1" + parent-require "^1.0.0" + +yargs-parser@^20.2.2: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs@^16.0.0, yargs@^16.0.3: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" diff --git a/docs-util/helpers/setup-server.js b/docs-util/helpers/setup-server.js new file mode 100644 index 0000000000..450279d1e7 --- /dev/null +++ b/docs-util/helpers/setup-server.js @@ -0,0 +1,30 @@ +const path = require("path"); +const { spawn } = require("child_process"); + +const { setPort } = require("./use-api"); + +module.exports = ({ cwd }) => { + const serverPath = path.join(__dirname, "test-server.js"); + + return new Promise((resolve, reject) => { + const medusaProcess = spawn("node", [path.resolve(serverPath)], { + cwd, + env: { + ...process.env, + NODE_ENV: "development", + JWT_SECRET: "test", + COOKIE_SECRET: "test", + }, + stdio: ["ignore", "ignore", "inherit", "ipc"], + }); + + medusaProcess.on("uncaughtException", (err) => { + medusaProcess.kill(); + }); + + medusaProcess.on("message", (port) => { + setPort(port); + resolve(medusaProcess); + }); + }); +}; diff --git a/docs-util/helpers/test-server.js b/docs-util/helpers/test-server.js new file mode 100644 index 0000000000..215f28e80c --- /dev/null +++ b/docs-util/helpers/test-server.js @@ -0,0 +1,32 @@ +const path = require("path"); +const express = require("express"); +const getPort = require("get-port"); + +const loaders = require("@medusajs/medusa/dist/loaders").default; + +const initialize = async () => { + const app = express(); + + const { dbConnection } = await loaders({ + directory: path.resolve(process.cwd()), + expressApp: app, + }); + + const PORT = await getPort(); + + return { + db: dbConnection, + app, + port: PORT, + }; +}; + +const setup = async () => { + const { app, port } = await initialize(); + + app.listen(port, (err) => { + process.send(port); + }); +}; + +setup(); diff --git a/docs-util/helpers/use-api.js b/docs-util/helpers/use-api.js new file mode 100644 index 0000000000..125e557e23 --- /dev/null +++ b/docs-util/helpers/use-api.js @@ -0,0 +1,21 @@ +const axios = require("axios").default; + +const ServerTestUtil = { + port_: null, + client_: null, + + setPort: function (port) { + this.client_ = axios.create({ baseURL: `http://localhost:${port}` }); + }, +}; + +const instance = ServerTestUtil; + +module.exports = { + setPort: function (port) { + instance.setPort(port); + }, + useApi: function () { + return instance.client_; + }, +}; diff --git a/docs-util/helpers/use-db.js b/docs-util/helpers/use-db.js new file mode 100644 index 0000000000..d533ae5ba2 --- /dev/null +++ b/docs-util/helpers/use-db.js @@ -0,0 +1,73 @@ +const { dropDatabase, createDatabase } = require("pg-god"); +const { createConnection } = require("typeorm"); + +const path = require("path"); + +const DbTestUtil = { + db_: null, + + setDb: function (connection) { + this.db_ = connection; + }, + + clear: function () { + return this.db_.synchronize(true); + }, + + shutdown: async function () { + await this.db_.close(); + return dropDatabase({ databaseName }); + }, +}; + +const instance = DbTestUtil; + +module.exports = { + initDb: async function ({ cwd }) { + const migrationDir = path.resolve( + path.join( + cwd, + `node_modules`, + `@medusajs`, + `medusa`, + `dist`, + `migrations` + ) + ); + + const databaseName = "medusa-fixtures"; + await createDatabase({ databaseName }); + + const connection = await createConnection({ + type: "postgres", + url: "postgres://localhost/medusa-fixtures", + migrations: [`${migrationDir}/*.js`], + }); + + await connection.runMigrations(); + await connection.close(); + + const modelsLoader = require(path.join( + cwd, + `node_modules`, + `@medusajs`, + `medusa`, + `dist`, + `loaders`, + `models` + )).default; + + const entities = modelsLoader({}, { register: false }); + const dbConnection = await createConnection({ + type: "postgres", + url: "postgres://localhost/medusa-fixtures", + entities, + }); + + instance.setDb(dbConnection); + return dbConnection; + }, + useDb: function () { + return instance; + }, +}; diff --git a/docs-util/helpers/use-server.js b/docs-util/helpers/use-server.js new file mode 100644 index 0000000000..14856511cb --- /dev/null +++ b/docs-util/helpers/use-server.js @@ -0,0 +1,41 @@ +const ServerTestUtil = { + server_: null, + app_: null, + + setApp: function (app) { + this.app_ = app; + }, + + start: async function () { + this.server_ = await new Promise((resolve, reject) => { + const s = this.app_.listen(PORT, (err) => { + if (err) { + reject(err); + } + }); + resolve(s); + }); + }, + + kill: function () { + return new Promise((resolve, _) => { + if (this.server_) { + this.server_.close(() => resolve()); + } + resolve(); + }); + }, +}; + +const instance = ServerTestUtil; + +module.exports = { + setApp: function (app) { + instance.setApp(app); + return instance; + }, + + useServer: function () { + return instance; + }, +}; diff --git a/docs-util/jest.config.js b/docs-util/jest.config.js new file mode 100644 index 0000000000..0b16f23091 --- /dev/null +++ b/docs-util/jest.config.js @@ -0,0 +1,22 @@ +const glob = require(`glob`); + +const pkgs = glob + .sync(`${__dirname}/*/`) + .map((p) => p.replace(__dirname, `/docs-util`)); + +module.exports = { + testEnvironment: `node`, + rootDir: `../`, + roots: pkgs, + testPathIgnorePatterns: [ + `/examples/`, + `/www/`, + `/dist/`, + `/node_modules/`, + `__tests__/fixtures`, + `__testfixtures__`, + `.cache`, + ], + transform: { "^.+\\.[jt]s$": `/jest-transformer.js` }, + setupFilesAfterEnv: ["/docs-util/setup.js"], +}; diff --git a/docs-util/setup.js b/docs-util/setup.js new file mode 100644 index 0000000000..7099f91215 --- /dev/null +++ b/docs-util/setup.js @@ -0,0 +1,7 @@ +const fixtureWriter = require("./fixture-gen/utils/write-fixture").default; +const { dropDatabase } = require("pg-god"); + +afterAll(async () => { + await dropDatabase({ databaseName: "medusa-fixtures" }); + await fixtureWriter.execute(); +}); diff --git a/docs/api/admin-spec3-base.json b/docs/api/admin-spec3-base.json new file mode 100644 index 0000000000..e0586ca4e1 --- /dev/null +++ b/docs/api/admin-spec3-base.json @@ -0,0 +1,74 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Medusa Admin API", + "license": { + "name": "MIT" + } + }, + "tags": [ + { + "name": "Auth", + "description": "Auth endpoints allows authorization of admin Users and manages their sessions." + }, + { + "name": "Collection", + "x-resourceId": "product_collection" + }, + { + "name": "Customer", + "x-resourceId": "customer" + }, + { + "name": "Discount", + "x-resourceId": "discount" + }, + { + "name": "Gift Card", + "x-resourceId": "gift_card" + }, + { + "name": "Notification", + "x-resourceId": "notification" + }, + { + "name": "Order", + "x-resourceId": "order" + }, + { + "name": "Product", + "x-resourceId": "product" + }, + { + "name": "Region", + "x-resourceId": "region" + }, + { + "name": "Return", + "x-resourceId": "return" + }, + { + "name": "Shipping Option", + "x-resourceId": "shipping_option" + }, + { + "name": "Shipping Profile", + "x-resourceId": "shipping_profile" + }, + { + "name": "Swap", + "x-resourceId": "swap" + }, + { + "name": "Product Variant", + "x-resourceId": "product_variant" + } + ], + "servers": [ + { + "url": "https://api.medusa-commerce.com/admin" + } + ], + "paths": {} +} diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json new file mode 100644 index 0000000000..ed108a033f --- /dev/null +++ b/docs/api/admin-spec3.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"version":"1.0.0","title":"Medusa Admin API","license":{"name":"MIT"}},"tags":[{"name":"Auth","description":"Auth endpoints allows authorization of admin Users and manages their sessions."},{"name":"Collection","x-resourceId":"product_collection"},{"name":"Customer","x-resourceId":"customer"},{"name":"Discount","x-resourceId":"discount"},{"name":"Gift Card","x-resourceId":"gift_card"},{"name":"Notification","x-resourceId":"notification"},{"name":"Order","x-resourceId":"order"},{"name":"Product","x-resourceId":"product"},{"name":"Region","x-resourceId":"region"},{"name":"Return","x-resourceId":"return"},{"name":"Shipping Option","x-resourceId":"shipping_option"},{"name":"Shipping Profile","x-resourceId":"shipping_profile"},{"name":"Swap","x-resourceId":"swap"},{"name":"Product Variant","x-resourceId":"product_variant"}],"servers":[{"url":"https://api.medusa-commerce.com/admin"}],"paths":{"/auth":{"post":{"operationId":"PostAuth","summary":"Authenticate a User","description":"Logs a User in and authorizes them to manage Store settings.","parameters":[],"tags":["Auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"User","description":"Represents a User who can manage store settings.","x-resourceId":"user","properties":{"id":{"description":"The unique id of the User. This will be prefixed with `usr_`","type":"string"},"email":{"description":"The email of the User","type":"string"},"first_name":{"type":"string"},"last_name":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","description":"The User's email."},"password":{"type":"string","description":"The User's password."}}}}}}},"get":{"operationId":"GetAuth","summary":"Get Session","description":"Gets the currently logged in User.","tags":["Auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"User","description":"Represents a User who can manage store settings.","x-resourceId":"user","properties":{"id":{"description":"The unique id of the User. This will be prefixed with `usr_`","type":"string"},"email":{"description":"The email of the User","type":"string"},"first_name":{"type":"string"},"last_name":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/customers":{"post":{"operationId":"PostCustomers","summary":"Create a Customer","description":"Creates a Customer.","parameters":[],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","first_name","last_name"],"properties":{"email":{"type":"string","description":"The Customer's email address."},"first_name":{"type":"string","description":"The Customer's first name."},"last_name":{"type":"string","description":"The Customer's last name."},"phone":{"type":"string","description":"The Customer's phone number."}}}}}}},"get":{"operationId":"GetCustomers","summary":"List Customers","description":"Retrieves a list of Customers.","tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/customers/{id}":{"get":{"operationId":"GetCustomersCustomer","summary":"Retrieve a Customer","description":"Retrieves a Customer.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}},"post":{"operationId":"PostCustomersCustomer","summary":"Update a Customer","description":"Updates a Customer.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"first_name":{"type":"string","description":"The Customer's first name."},"last_name":{"type":"string","description":"The Customer's last name."},"phone":{"description":"The Customer's phone number.","type":"object"}}}}}},"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/collections":{"post":{"operationId":"PostCollections","summary":"Create a Product Collection","description":"Creates a Product Collection.","requestBody":{"content":{"application/json":{"schema":{"required":["title"],"properties":{"title":{"type":"string","description":"The title to identify the Collection by."},"handle":{"type":"string","description":"An optional handle to be used in slugs, if none is provided we will kebab-case the title."},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Collection"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"collection":{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetCollections","summary":"List Product Collections","description":"Retrieve a list of Product Collection.","tags":["Collection"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"collection":{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/collections/{id}":{"delete":{"operationId":"DeleteCollectionsCollection","summary":"Delete a Product Collection","description":"Deletes a Product Collection.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Collection.","schema":{"type":"string"}}],"tags":["Collection"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Collection"},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"get":{"operationId":"GetCollectionsCollection","summary":"Retrieve a Product Collection","description":"Retrieves a Product Collection.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product Collection","schema":{"type":"string"}}],"tags":["Collection"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"collection":{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostCollectionsCollection","summary":"Update a Product Collection","description":"Updates a Product Collection.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Collection.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"type":"string","description":"The title to identify the Collection by."},"handle":{"type":"string","description":"An optional handle to be used in slugs, if none is provided we will kebab-case the title."},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Collection"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"collection":{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/notifications":{"get":{"operationId":"GetNotifications","summary":"List Notifications","description":"Retrieves a list of Notifications.","tags":["Notification"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"notifications":{"type":"array","items":{"title":"Notification","description":"Notifications a communications sent via Notification Providers as a reaction to internal events such as `order.placed`. Notifications can be used to show a chronological timeline for communications sent to a Customer regarding an Order, and enables resends.","x-resourceId":"notification","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"customer_id":{"description":"The id of the Customer that the Notification was sent to.","type":"string"},"customer":{"description":"The Customer that the Notification was sent to.","anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"resends":{"description":"The resends that have been completed after the original Notification.","type":"array","items":{"title":"Notification Resend","description":"A resend of a Notification.","x-resourceId":"notification_resend","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}}}}}}}}}},"/notifications/{id}/resend":{"post":{"operationId":"PostNotificationsNotificationResend","summary":"Resend Notification","description":"Resends a previously sent notifications, with the same data but optionally to a different address","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Notification","schema":{"type":"string"}}],"tags":["Notification"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"notification":{"title":"Notification","description":"Notifications a communications sent via Notification Providers as a reaction to internal events such as `order.placed`. Notifications can be used to show a chronological timeline for communications sent to a Customer regarding an Order, and enables resends.","x-resourceId":"notification","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"customer_id":{"description":"The id of the Customer that the Notification was sent to.","type":"string"},"customer":{"description":"The Customer that the Notification was sent to.","anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"resends":{"description":"The resends that have been completed after the original Notification.","type":"array","items":{"title":"Notification Resend","description":"A resend of a Notification.","x-resourceId":"notification_resend","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}}}}}}}}},"/gift-cards":{"post":{"operationId":"PostGiftCards","summary":"Create a Gift Card","description":"Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.","requestBody":{"content":{"application/json":{"schema":{"properties":{"value":{"type":"integer","description":"The value (excluding VAT) that the Gift Card should represent."},"is_disabled":{"type":"boolean","description":"Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers."},"ends_at":{"type":"string","format":"date-time","description":"The time at which the Gift Card should no longer be available."},"region_id":{"description":"The id of the Region in which the Gift Card can be used.","type":"array","items":{"type":"string"}},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Gift Card"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"gift_card":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetGiftCards","summary":"List Gift Cards","description":"Retrieves a list of Gift Cards.","tags":["Gift Card"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/gift-cards/{id}":{"delete":{"operationId":"DeleteGiftCardsGiftCard","summary":"Delete a Gift Card","description":"Deletes a Gift Card","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Gift Card to delete.","schema":{"type":"string"}}],"tags":["Gift Card"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Gift Card"},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"get":{"operationId":"GetGiftCardsGiftCard","summary":"Retrieve a Gift Card","description":"Retrieves a Gift Card.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Gift Card.","schema":{"type":"string"}}],"tags":["Gift Card"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"gift_card":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostGiftCardsGiftCard","summary":"Create a Gift Card","description":"Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Gift Card.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"balance":{"type":"integer","description":"The value (excluding VAT) that the Gift Card should represent."},"is_disabled":{"type":"boolean","description":"Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers."},"ends_at":{"type":"string","format":"date-time","description":"The time at which the Gift Card should no longer be available."},"region_id":{"description":"The id of the Region in which the Gift Card can be used.","type":"array","items":{"type":"string"}},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Gift Card"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"gift_card":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/discounts/{id}/regions/{region_id}":{"post":{"operationId":"PostDiscountsDiscountRegionsRegion","summary":"Adds Region availability","description":"Adds a Region to the list of Regions that a Discount can be used in.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount.","schema":{"type":"string"}},{"in":"path","name":"region_id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"delete":{"operationId":"DeleteDiscountsDiscountRegionsRegion","summary":"Remove Region availability","description":"Removes a Region from the list of Regions that a Discount can be used in.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount.","schema":{"type":"string"}},{"in":"path","name":"region_id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/discounts/{id}/products/{product_id}":{"post":{"operationId":"DeleteDiscountsDiscountProductsProduct","summary":"Remove Product availability","description":"Removes a Product from the list of Products that a Discount can be used for.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount.","schema":{"type":"string"}},{"in":"path","name":"product_id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/discounts":{"post":{"operationId":"PostDiscounts","summary":"Creates a Discount","description":"Creates a Discount with a given set of rules that define how the Discount behaves.","requestBody":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string","description":"A unique code that will be used to redeem the Discount"},"is_dynamic":{"type":"string","description":"Whether the Discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated codes that all have to follow a common set of rules."},"rule":{"description":"The Discount Rule that defines how Discounts are calculated","oneOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"type":"boolean","description":"Whether the Discount code is disabled on creation. You will have to enable it later to make it available to Customers."},"starts_at":{"type":"string","format":"date-time","description":"The time at which the Discount should be available."},"ends_at":{"type":"string","format":"date-time","description":"The time at which the Discount should no longer be available."},"regions":{"description":"A list of Region ids representing the Regions in which the Discount can be used.","type":"array","items":{"type":"string"}},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetDiscounts","summary":"List Discounts","description":"Retrieves a list of Discounts","tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/discounts/{id}/dynamic-codes":{"post":{"operationId":"PostDiscountsDiscountDynamicCodes","summary":"Create a dynamic Discount code","description":"Creates a unique code that can map to a parent Discount. This is useful if you want to automatically generate codes with the same behaviour.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount to create the dynamic code from.\"","schema":{"type":"string"}}],"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"The unique code that will be used to redeem the Discount."},"metadata":{"type":"object","description":"An optional set of key-value paris to hold additional information."}}}}}}}},"/discounts/{id}":{"delete":{"operationId":"DeleteDiscountsDiscount","summary":"Delete a Discount","description":"Deletes a Discount.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount","schema":{"type":"string"}}],"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Discount"},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"get":{"operationId":"GetDiscountsDiscount","summary":"Retrieve a Discount","description":"Retrieves a Discount","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount","schema":{"type":"string"}}],"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostDiscountsDiscount","summary":"Update a Discount","description":"Updates a Discount with a given set of rules that define how the Discount behaves.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string","description":"A unique code that will be used to redeem the Discount"},"is_dynamic":{"type":"string","description":"Whether the Discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated codes that all have to follow a common set of rules."},"rule":{"description":"The Discount Rule that defines how Discounts are calculated","oneOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"type":"boolean","description":"Whether the Discount code is disabled on creation. You will have to enable it later to make it available to Customers."},"starts_at":{"type":"string","format":"date-time","description":"The time at which the Discount should be available."},"ends_at":{"type":"string","format":"date-time","description":"The time at which the Discount should no longer be available."},"regions":{"description":"A list of Region ids representing the Regions in which the Discount can be used.","type":"array","items":{"type":"string"}}}}}}},"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/discounts/{id}/dynamic-codes/{code}":{"delete":{"operationId":"DeleteDiscountsDiscountDynamicCodesCode","summary":"Delete a dynamic code","description":"Deletes a dynamic code from a Discount.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Discount","schema":{"type":"string"}},{"in":"path","name":"code","required":true,"description":"The id of the Discount","schema":{"type":"string"}}],"tags":["Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/orders/{id}/shipping-methods":{"post":{"operationId":"PostOrdersOrderShippingMethods","summary":"Add a Shipping Method","description":"Adds a Shipping Method to an Order. If another Shipping Method exists with the same Shipping Profile, the previous Shipping Method will be replaced.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["price","option_id","data"],"properties":{"price":{"type":"integer","description":"The price (excluding VAT) that should be charged for the Shipping Method"},"option_id":{"type":"string","description":"The id of the Shipping Option to create the Shipping Method from."},"data":{"type":"object","description":"The data required for the Shipping Option to create a Shipping Method. This will depend on the Fulfillment Provider."}}}}}}}},"/orders/{id}/cancel":{"post":{"operationId":"PostOrdersOrderCancel","summary":"Cancel an Order","description":"Registers an Order as canceled. This triggers a flow that will cancel any created Fulfillments and Payments, may fail if the Payment or Fulfillment Provider is unable to cancel the Payment/Fulfillment.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/capture":{"post":{"operationId":"PostOrdersOrderCapture","summary":"Capture an Order","description":"Captures all the Payments associated with an Order.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/claims/{claim_id}/shipments":{"post":{"operationId":"PostOrdersOrderClaimsClaimShipments","summary":"Create Claim Shipment","description":"Registers a Claim Fulfillment as shipped.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"claim_id","required":true,"description":"The id of the Claim.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fulfillment_id":{"description":"The id of the Fulfillment.","type":"string"},"tracking_numbers":{"description":"The tracking numbers for the shipment.","type":"array","items":{"type":"string"}}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/order/{id}/claims":{"post":{"operationId":"PostOrdersOrderClaims","summary":"Create a Claim","description":"Creates a Claim.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"type":{"description":"The type of the Claim. This will determine how the Claim is treated: `replace` Claims will result in a Fulfillment with new items being created, while a `refund` Claim will refund the amount paid for the claimed items.","type":"string","enum":["replace","refund"]},"claim_items":{"description":"The Claim Items that the Claim will consist of.","type":"array","items":{"properties":{"item_id":{"description":"The id of the Line Item that will be claimed.","type":"string"},"quantity":{"description":"The number of items that will be returned","type":"integer"},"note":{"description":"Short text describing the Claim Item in further detail.","type":"string"},"reason":{"description":"The reason for the Claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"tags":{"description":"A list o tags to add to the Claim Item","type":"array","items":{"type":"string"}},"images":{"description":"A list of image URL's that will be associated with the Claim","items":{"type":"string"}}}}},"return_shipping":{"description":"Optional details for the Return Shipping Method, if the items are to be sent back.","type":"object","properties":{"option_id":{"type":"string","description":"The id of the Shipping Option to create the Shipping Method from."},"price":{"type":"integer","description":"The price to charge for the Shipping Method."}}},"additional_items":{"description":"The new items to send to the Customer when the Claim type is Replace.","type":"array","items":{"properties":{"variant_id":{"description":"The id of the Product Variant to ship.","type":"string"},"quantity":{"description":"The quantity of the Product Variant to ship.","type":"integer"}}}},"shipping_methods":{"description":"The Shipping Methods to send the additional Line Items with.","type":"array","items":{"properties":{"id":{"description":"The id of an existing Shipping Method","type":"string"},"option_id":{"description":"The id of the Shipping Option to create a Shipping Method from","type":"string"},"price":{"description":"The price to charge for the Shipping Method","type":"integer"}}}},"refund_amount":{"description":"The amount to refund the Customer when the Claim type is `refund`.","type":"integer"},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/fulfillments":{"post":{"operationId":"PostOrdersOrderFulfillments","summary":"Create a Fulfillment","description":"Creates a Fulfillment of an Order - will notify Fulfillment Providers to prepare a shipment.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"items":{"description":"The Line Items to include in the Fulfillment.","type":"array","items":{"properties":{"item_id":{"description":"The id of Line Item to fulfill.","type":"string"},"quantity":{"description":"The quantity of the Line Item to fulfill.","type":"integer"}}}},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/shipment":{"post":{"operationId":"PostOrdersOrderShipment","summary":"Create a Shipment","description":"Registers a Fulfillment as shipped.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fulfillment_id":{"description":"The id of the Fulfillment.","type":"string"},"tracking_numbers":{"description":"The tracking numbers for the shipment.","type":"array","items":{"type":"string"}}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/swaps/{swap_id}/shipments":{"post":{"operationId":"PostOrdersOrderSwapsSwapShipments","summary":"Create Swap Shipment","description":"Registers a Swap Fulfillment as shipped.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"swap_id","required":true,"description":"The id of the Swap.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"fulfillment_id":{"description":"The id of the Fulfillment.","type":"string"},"tracking_numbers":{"description":"The tracking numbers for the shipment.","type":"array","items":{"type":"string"}}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/order/{id}/swaps":{"post":{"operationId":"PostOrdersOrderSwaps","summary":"Create a Swap","description":"Creates a Swap. Swaps are used to handle Return of previously purchased goods and Fulfillment of replacements simultaneously.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Swap.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"return_items":{"description":"The Line Items to return as part of the Swap.","type":"array","items":{"properties":{"item_id":{"description":"The id of the Line Item that will be claimed.","type":"string"},"quantity":{"description":"The number of items that will be returned","type":"integer"}}}},"return_shipping":{"description":"How the Swap will be returned.","type":"object","properties":{"option_id":{"type":"string","description":"The id of the Shipping Option to create the Shipping Method from."},"price":{"type":"integer","description":"The price to charge for the Shipping Method."}}},"additional_items":{"description":"The new items to send to the Customer.","type":"array","items":{"properties":{"variant_id":{"description":"The id of the Product Variant to ship.","type":"string"},"quantity":{"description":"The quantity of the Product Variant to ship.","type":"integer"}}}}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/order/{id}/metadata/{key}":{"delete":{"operationId":"DeleteOrdersOrderMetadataKey","summary":"Delete Metadata","description":"Deletes a metadata key.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"key","required":true,"description":"The metadata key.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/claims/{claim_id}/fulfillments":{"post":{"operationId":"PostOrdersOrderClaimsClaimFulfillments","summary":"Create a Claim Fulfillment","description":"Creates a Fulfillment for a Claim.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"claim_id","required":true,"description":"The id of the Claim.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/swaps/{swap_id}/fulfillments":{"post":{"operationId":"PostOrdersOrderSwapsSwapFulfillments","summary":"Create a Swap Fulfillment","description":"Creates a Fulfillment for a Swap.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"swap_id","required":true,"description":"The id of the Swap.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}":{"get":{"operationId":"GetOrdersOrder","summary":"Retrieve an Order","description":"Retrieves an Order","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders":{"get":{"operationId":"GetOrders","summary":"List Orders","description":"Retrieves an list of Orders","tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/swaps/{swap_id}/process-payment":{"post":{"operationId":"PostOrdersOrderSwapsSwapProcessPayment","summary":"Process a Swap difference","description":"When there are differences between the returned and shipped Products in a Swap, the difference must be processed. Either a Refund will be issued or a Payment will be captured.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"swap_id","required":true,"description":"The id of the Swap.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/returns/{return_id}/receive":{"post":{"operationId":"PostOrdersOrderReturnsReturnReceive","summary":"Receive a Return","description":"Registers a Return as received.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"return_id","required":true,"description":"The id of the Return.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"items":{"description":"The Line Items that have been received.","type":"array","items":{"properties":{"item_id":{"description":"The id of the Line Item.","type":"string"},"quantity":{"description":"The quantity of the Line Item.","type":"integer"}}}},"refund":{"description":"The amount to refund.","type":"integer"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/swaps/{swap_id}/receive":{"post":{"operationId":"PostOrdersOrderSwapsSwapReceive","summary":"Receive a Swap","description":"Registers a Swap as received.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"swap_id","required":true,"description":"The id of the Swap.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"items":{"description":"The Line Items that have been received.","type":"array","items":{"properties":{"item_id":{"description":"The id of the Line Item.","type":"string"},"quantity":{"description":"The quantity of the Line Item.","type":"integer"}}}}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/refunds":{"post":{"operationId":"PostOrdersOrderRefunds","summary":"Create a Refund","description":"Issues a Refund.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"required":["amount","reason"],"properties":{"amount":{"description":"The amount to refund.","type":"integer"},"reason":{"description":"The reason for the Refund.","type":"string"},"note":{"description":"A not with additional details about the Refund.","type":"string"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}/returns":{"post":{"operationId":"PostOrdersOrderReturns","summary":"Request a Return","description":"Requests a Return. If applicable a return label will be created and other plugins notified.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"items":{"description":"The Line Items that will be returned.","type":"array","items":{"properties":{"item_id":{"description":"The id of the Line Item.","type":"string"},"quantity":{"description":"The quantity of the Line Item.","type":"integer"}}}},"return_shipping":{"description":"The Shipping Method to be used to handle the return shipment.","type":"object","properties":{"option_id":{"type":"string","description":"The id of the Shipping Option to create the Shipping Method from."},"price":{"type":"integer","description":"The price to charge for the Shipping Method."}}},"receive_now":{"description":"A flag to indicate if the Return should be registerd as received immediately.","type":"boolean"},"refund":{"description":"The amount to refund.","type":"integer"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/order/{id}/claims/{claim_id}":{"post":{"operationId":"PostOrdersOrderClaimsClaim","summary":"Update a Claim","description":"Updates a Claim.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}},{"in":"path","name":"claim_id","required":true,"description":"The id of the Claim.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"claim_items":{"description":"The Claim Items that the Claim will consist of.","type":"array","items":{"properties":{"id":{"description":"The id of the Claim Item.","type":"string"},"item_id":{"description":"The id of the Line Item that will be claimed.","type":"string"},"quantity":{"description":"The number of items that will be returned","type":"integer"},"note":{"description":"Short text describing the Claim Item in further detail.","type":"string"},"reason":{"description":"The reason for the Claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"tags":{"description":"A list o tags to add to the Claim Item","type":"array","items":{"type":"string"}},"images":{"description":"A list of image URL's that will be associated with the Claim","items":{"type":"string"}}}}},"shipping_methods":{"description":"The Shipping Methods to send the additional Line Items with.","type":"array","items":{"properties":{"id":{"description":"The id of an existing Shipping Method","type":"string"},"option_id":{"description":"The id of the Shipping Option to create a Shipping Method from","type":"string"},"price":{"description":"The price to charge for the Shipping Method","type":"integer"}}}},"metadata":{"description":"An optional set of key-value pairs to hold additional information.","type":"object"}}}}}},"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/products/{id}/options":{"post":{"operationId":"PostProductsProductOptions","summary":"Add an Option","description":"Adds a Product Option to a Product","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"description":"The title the Product Option will be identified by i.e. \"Size\"","type":"string"}}}}}},"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/products":{"post":{"operationId":"PostProducts","summary":"Create a Product","description":"Creates a Product","requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"description":"The title of the Product","type":"string"},"subtitle":{"description":"The subtitle of the Product","type":"string"},"description":{"description":"A description of the Product.","type":"string"},"is_giftcard":{"description":"A flag to indicate if the Product represents a Gift Card. Purchasing Products with this flag set to `true` will result in a Gift Card being created.","type":"boolean"},"images":{"description":"Images of the Product.","type":"array","items":{"type":"string"}},"thumbnail":{"description":"The thumbnail to use for the Product.","type":"string"},"handle":{"description":"A unique handle to identify the Product by.","type":"string"},"type":{"description":"The Product Type to associate the Product with.","type":"object","properties":{"value":{"description":"The value of the Product Type.","type":"string"}}},"collection_id":{"description":"The id of the Collection the Product should belong to.","type":"string"},"tags":{"description":"Tags to associate the Product with.","type":"array","items":{"properties":{"id":{"description":"The id of an existing Tag.","type":"string"},"value":{"description":"The value of the Tag, these will be upserted.","type":"string"}}}},"options":{"description":"The Options that the Product should have. These define on which properties the Product's Product Variants will differ.","type":"array","items":{"properties":{"title":{"description":"The title to identify the Product Option by.","type":"string"}}}},"variants":{"description":"A list of Product Variants to create with the Product.","type":"array","items":{"properties":{"title":{"description":"The title to identify the Product Variant by.","type":"string"},"sku":{"description":"The unique SKU for the Product Variant.","type":"string"},"ean":{"description":"The EAN number of the item.","type":"string"},"upc":{"description":"The UPC number of the item.","type":"string"},"barcode":{"description":"A generic GTIN field for the Product Variant.","type":"string"},"hs_code":{"description":"The Harmonized System code for the Product Variant.","type":"string"},"inventory_quantity":{"description":"The amount of stock kept for the Product Variant.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant can be purchased when out of stock.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should keep track of the inventory for this Product Variant.","type":"boolean"},"weight":{"description":"The wieght of the Product Variant.","type":"string"},"length":{"description":"The length of the Product Variant.","type":"string"},"height":{"description":"The height of the Product Variant.","type":"string"},"width":{"description":"The width of the Product Variant.","type":"string"},"origin_country":{"description":"The country of origin of the Product Variant.","type":"string"},"mid_code":{"description":"The Manufacturer Identification code for the Product Variant.","type":"string"},"material":{"description":"The material composition of the Product Variant.","type":"string"},"metadata":{"description":"An optional set of key-value pairs with additional information.","type":"object"},"prices":{"type":"array","items":{"properties":{"region_id":{"description":"The id of the Region for which the price is used.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code for which the price will be used.","type":"string"},"amount":{"description":"The amount to charge for the Product Variant.","type":"integer"},"sale_amount":{"description":"The sale amount to charge for the Product Variant.","type":"integer"}}}},"options":{"type":"array","items":{"properties":{"value":{"description":"The value to give for the Product Option at the same index in the Product's `options` field.","type":"string"}}}}}}},"weight":{"description":"The wieght of the Product.","type":"string"},"length":{"description":"The length of the Product.","type":"string"},"height":{"description":"The height of the Product.","type":"string"},"width":{"description":"The width of the Product.","type":"string"},"origin_country":{"description":"The country of origin of the Product.","type":"string"},"mid_code":{"description":"The Manufacturer Identification code for the Product.","type":"string"},"material":{"description":"The material composition of the Product.","type":"string"},"metadata":{"description":"An optional set of key-value pairs with additional information.","type":"object"}}}}}},"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetProducts","summary":"List Product","description":"Retrieves a list of Product","tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"count":{"description":"The number of Products.","type":"integer"},"offset":{"description":"The offset of the Product query.","type":"integer"},"limit":{"description":"The limit of the Product query.","type":"integer"},"products":{"type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/products/{id}/variants":{"post":{"operationId":"PostProductsProductVariants","summary":"Create a Product Variant","description":"Creates a Product Variant. Each Product Variant must have a unique combination of Product Option Values.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"description":"The title to identify the Product Variant by.","type":"string"},"sku":{"description":"The unique SKU for the Product Variant.","type":"string"},"ean":{"description":"The EAN number of the item.","type":"string"},"upc":{"description":"The UPC number of the item.","type":"string"},"barcode":{"description":"A generic GTIN field for the Product Variant.","type":"string"},"hs_code":{"description":"The Harmonized System code for the Product Variant.","type":"string"},"inventory_quantity":{"description":"The amount of stock kept for the Product Variant.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant can be purchased when out of stock.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should keep track of the inventory for this Product Variant.","type":"boolean"},"weight":{"description":"The wieght of the Product Variant.","type":"string"},"length":{"description":"The length of the Product Variant.","type":"string"},"height":{"description":"The height of the Product Variant.","type":"string"},"width":{"description":"The width of the Product Variant.","type":"string"},"origin_country":{"description":"The country of origin of the Product Variant.","type":"string"},"mid_code":{"description":"The Manufacturer Identification code for the Product Variant.","type":"string"},"material":{"description":"The material composition of the Product Variant.","type":"string"},"metadata":{"description":"An optional set of key-value pairs with additional information.","type":"object"},"prices":{"type":"array","items":{"properties":{"region_id":{"description":"The id of the Region for which the price is used.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code for which the price will be used.","type":"string"},"amount":{"description":"The amount to charge for the Product Variant.","type":"integer"},"sale_amount":{"description":"The sale amount to charge for the Product Variant.","type":"integer"}}}},"options":{"type":"array","items":{"properties":{"option_id":{"description":"The id of the Product Option to set the value for.","type":"string"},"value":{"description":"The value to give for the Product Option.","type":"string"}}}}}}}}},"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetProductsProductVariants","summary":"List a Product's Product Variants","description":"Retrieves a list of the Product Variants associated with a Product.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"variants":{"type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/products/{id}/options/{option_id}":{"delete":{"operationId":"DeleteProductsProductOptionsOption","summary":"Delete a Product Option","description":"Deletes a Product Option. Before a Product Option can be deleted all Option Values for the Product Option must be the same. You may, for example, have to delete some of your variants prior to deleting the Product Option","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}},{"in":"path","name":"option_id","required":true,"description":"The id of the Product Option.","schema":{"type":"string"}}],"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Product Option"},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"},"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostProductsProductOptionsOption","summary":"Update a Product Option.","description":"Updates a Product Option","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}},{"in":"path","name":"option_id","required":true,"description":"The id of the Product Option.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"description":"The title of the Product Option","type":"string"}}}}}},"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/products/{id}":{"delete":{"operationId":"DeleteProductsProduct","summary":"Delete a Product","description":"Deletes a Product and it's associated Product Variants.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Product."},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"get":{"operationId":"GetProductsProduct","summary":"Retrieve a Product","description":"Retrieves a Product.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostProductsProduct","summary":"Update a Product","description":"Updates a Product","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"description":"The title of the Product","type":"string"},"subtitle":{"description":"The subtitle of the Product","type":"string"},"description":{"description":"A description of the Product.","type":"string"},"is_giftcard":{"description":"A flag to indicate if the Product represents a Gift Card. Purchasing Products with this flag set to `true` will result in a Gift Card being created.","type":"boolean"},"images":{"description":"Images of the Product.","type":"array","items":{"type":"string"}},"thumbnail":{"description":"The thumbnail to use for the Product.","type":"string"},"handle":{"description":"A unique handle to identify the Product by.","type":"string"},"type":{"description":"The Product Type to associate the Product with.","type":"object","properties":{"value":{"description":"The value of the Product Type.","type":"string"}}},"collection_id":{"description":"The id of the Collection the Product should belong to.","type":"string"},"tags":{"description":"Tags to associate the Product with.","type":"array","items":{"properties":{"id":{"description":"The id of an existing Tag.","type":"string"},"value":{"description":"The value of the Tag, these will be upserted.","type":"string"}}}},"options":{"description":"The Options that the Product should have. These define on which properties the Product's Product Variants will differ.","type":"array","items":{"properties":{"title":{"description":"The title to identify the Product Option by.","type":"string"}}}},"variants":{"description":"A list of Product Variants to create with the Product.","type":"array","items":{"properties":{"title":{"description":"The title to identify the Product Variant by.","type":"string"},"sku":{"description":"The unique SKU for the Product Variant.","type":"string"},"ean":{"description":"The EAN number of the item.","type":"string"},"upc":{"description":"The UPC number of the item.","type":"string"},"barcode":{"description":"A generic GTIN field for the Product Variant.","type":"string"},"hs_code":{"description":"The Harmonized System code for the Product Variant.","type":"string"},"inventory_quantity":{"description":"The amount of stock kept for the Product Variant.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant can be purchased when out of stock.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should keep track of the inventory for this Product Variant.","type":"boolean"},"weight":{"description":"The wieght of the Product Variant.","type":"string"},"length":{"description":"The length of the Product Variant.","type":"string"},"height":{"description":"The height of the Product Variant.","type":"string"},"width":{"description":"The width of the Product Variant.","type":"string"},"origin_country":{"description":"The country of origin of the Product Variant.","type":"string"},"mid_code":{"description":"The Manufacturer Identification code for the Product Variant.","type":"string"},"material":{"description":"The material composition of the Product Variant.","type":"string"},"metadata":{"description":"An optional set of key-value pairs with additional information.","type":"object"},"prices":{"type":"array","items":{"properties":{"region_id":{"description":"The id of the Region for which the price is used.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code for which the price will be used.","type":"string"},"amount":{"description":"The amount to charge for the Product Variant.","type":"integer"},"sale_amount":{"description":"The sale amount to charge for the Product Variant.","type":"integer"}}}},"options":{"type":"array","items":{"properties":{"value":{"description":"The value to give for the Product Option at the same index in the Product's `options` field.","type":"string"}}}}}}},"weight":{"description":"The wieght of the Product.","type":"string"},"length":{"description":"The length of the Product.","type":"string"},"height":{"description":"The height of the Product.","type":"string"},"width":{"description":"The width of the Product.","type":"string"},"origin_country":{"description":"The country of origin of the Product.","type":"string"},"mid_code":{"description":"The Manufacturer Identification code for the Product.","type":"string"},"material":{"description":"The material composition of the Product.","type":"string"},"metadata":{"description":"An optional set of key-value pairs with additional information.","type":"object"}}}}}},"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/products/{id}/variants/{variant_id}":{"delete":{"operationId":"DeleteProductsProductVariantsVariant","summary":"Delete a Product Variant","description":"Deletes a Product Variant.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}},{"in":"path","name":"variant_id","required":true,"description":"The id of the Product Variant.","schema":{"type":"string"}}],"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Product Variant."},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"post":{"operationId":"PostProductsProductVariantsVariant","summary":"Update a Product Variant","description":"Update a Product Variant.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}},{"in":"path","name":"variant_id","required":true,"description":"The id of the Product Variant.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"title":{"description":"The title to identify the Product Variant by.","type":"string"},"sku":{"description":"The unique SKU for the Product Variant.","type":"string"},"ean":{"description":"The EAN number of the item.","type":"string"},"upc":{"description":"The UPC number of the item.","type":"string"},"barcode":{"description":"A generic GTIN field for the Product Variant.","type":"string"},"hs_code":{"description":"The Harmonized System code for the Product Variant.","type":"string"},"inventory_quantity":{"description":"The amount of stock kept for the Product Variant.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant can be purchased when out of stock.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should keep track of the inventory for this Product Variant.","type":"boolean"},"weight":{"description":"The wieght of the Product Variant.","type":"string"},"length":{"description":"The length of the Product Variant.","type":"string"},"height":{"description":"The height of the Product Variant.","type":"string"},"width":{"description":"The width of the Product Variant.","type":"string"},"origin_country":{"description":"The country of origin of the Product Variant.","type":"string"},"mid_code":{"description":"The Manufacturer Identification code for the Product Variant.","type":"string"},"material":{"description":"The material composition of the Product Variant.","type":"string"},"metadata":{"description":"An optional set of key-value pairs with additional information.","type":"object"},"prices":{"type":"array","items":{"properties":{"region_id":{"description":"The id of the Region for which the price is used.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code for which the price will be used.","type":"string"},"amount":{"description":"The amount to charge for the Product Variant.","type":"integer"},"sale_amount":{"description":"The sale amount to charge for the Product Variant.","type":"integer"}}}},"options":{"type":"array","items":{"properties":{"option_id":{"description":"The id of the Product Option to set the value for.","type":"string"},"value":{"description":"The value to give for the Product Option.","type":"string"}}}}}}}}},"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/products/types":{"get":{"operationId":"GetProductsTypes","summary":"List Product Types","description":"Retrieves a list of Product Types.","tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"types":{"type":"array","items":{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/regions/{id}/countries":{"post":{"operationId":"PostRegionsRegionCountries","summary":"Add Country","description":"Adds a Country to the list of Countries in a Region","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"country_code":{"description":"The 2 character ISO code for the Country.","type":"string"}}}}}},"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions/{id}/fulfillment-providers":{"post":{"operationId":"PostRegionsRegionFulfillmentProviders","summary":"Add Fulfillment Provider","description":"Adds a Fulfillment Provider to a Region","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"provider_id":{"description":"The id of the Fulfillment Provider to add.","type":"string"}}}}}},"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions/{id}/payment-providers":{"post":{"operationId":"PostRegionsRegionPaymentProviders","summary":"Add Payment Provider","description":"Adds a Payment Provider to a Region","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"provider_id":{"description":"The id of the Payment Provider to add.","type":"string"}}}}}},"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions":{"post":{"operationId":"PostRegions","summary":"Create a Region","description":"Creates a Region","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the Region","type":"string"},"currency_code":{"description":"The 3 character ISO currency code to use for the Region.","type":"string"},"tax_code":{"description":"An optional tax code the Region.","type":"string"},"tax_rate":{"description":"The tax rate to use on Orders in the Region.","type":"number"},"payment_providers":{"description":"A list of Payment Providers that should be enabled for the Region","type":"array","items":{"type":"string"}},"fulfillment_providers":{"description":"A list of Fulfillment Providers that should be enabled for the Region","type":"array","items":{"type":"string"}},"countries":{"description":"A list of countries that should be included in the Region.","type":"array","items":{"type":"string"}}}}}}},"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetRegions","summary":"List Regions","description":"Retrieves a list of Regions.","tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"regions":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/regions/{id}/metadata/{key}":{"delete":{"operationId":"DeleteRegionsRegionMetadataKey","summary":"Delete Metadata","description":"Deletes a metadata key.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}},{"in":"path","name":"key","required":true,"description":"The metadata key.","schema":{"type":"string"}}],"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions/{id}":{"delete":{"operationId":"DeleteRegionsRegion","summary":"Delete a Region","description":"Deletes a Region.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Region."},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"get":{"operationId":"GetRegionsRegion","summary":"Retrieve a Region","description":"Retrieves a Region.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostRegionsRegion","summary":"Update a Region","description":"Updates a Region","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the Region","type":"string"},"currency_code":{"description":"The 3 character ISO currency code to use for the Region.","type":"string"},"tax_code":{"description":"An optional tax code the Region.","type":"string"},"tax_rate":{"description":"The tax rate to use on Orders in the Region.","type":"number"},"payment_providers":{"description":"A list of Payment Providers that should be enabled for the Region","type":"array","items":{"type":"string"}},"fulfillment_providers":{"description":"A list of Fulfillment Providers that should be enabled for the Region","type":"array","items":{"type":"string"}},"countries":{"description":"A list of countries that should be included in the Region.","type":"array","items":{"type":"string"}}}}}}},"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions/{id}/fulfillment-options":{"get":{"operationId":"GetRegionsRegionFulfillmentOptions","summary":"List Fulfillment Options available in the Region","description":"Gathers all the fulfillment options available to in the Region.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"fulfillment_options":{"type":"array","items":{"type":"object"}}}}}}}}}},"/regions/{id}/countries/{country_code}":{"delete":{"operationId":"PostRegionsRegionCountriesCountry","summary":"Remove Country","description":"Removes a Country from the list of Countries in a Region","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}},{"in":"path","name":"country_code","required":true,"description":"The 2 character ISO code for the Country.","schema":{"type":"string"}}],"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions/{id}/fulfillment-providers/{provider_id}":{"delete":{"operationId":"PostRegionsRegionFulfillmentProvidersProvider","summary":"Remove Fulfillment Provider","description":"Removes a Fulfillment Provider.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}},{"in":"path","name":"provider_id","required":true,"description":"The id of the Fulfillment Provider.","schema":{"type":"string"}}],"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions/{id}/payment-providers/{provider_id}":{"delete":{"operationId":"PostRegionsRegionPaymentProvidersProvider","summary":"Remove Payment Provider","description":"Removes a Payment Provider.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}},{"in":"path","name":"provider_id","required":true,"description":"The id of the Payment Provider.","schema":{"type":"string"}}],"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/returns":{"get":{"operationId":"GetReturns","summary":"List Returns","description":"Retrieves a list of Returns","tags":["Return"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/shipping-options":{"post":{"operationId":"PostShippingOptions","summary":"Create Shipping Option","description":"Creates a Shipping Option","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the Shipping Option","type":"string"},"region_id":{"description":"The id of the Region in which the Shipping Option will be available.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider that handles the Shipping Option.","type":"string"},"profile_id":{"description":"The id of the Shipping Profile to add the Shipping Option to.","type":"number"},"data":{"description":"The data needed for the Fulfillment Provider to handle shipping with this Shipping Option.","type":"object"},"price_type":{"description":"The type of the Shipping Option price.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for the Shipping Option.","type":"integer"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available.","type":"array","items":{"properties":{"type":{"description":"The type of the requirement","type":"string","enum":["max_subtotal","min_subtotal"]},"amount":{"description":"The amount to compare with.","type":"integer"}}}},"is_return":{"description":"Whether the Shipping Option defines a return shipment.","type":"boolean"}}}}}},"tags":["Shipping Option"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_option":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetShippingOptions","summary":"List Shipping Options","description":"Retrieves a list of Shipping Options.","tags":["Shipping Option"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_options":{"type":"array","items":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/shipping-options/{id}":{"delete":{"operationId":"DeleteShippingOptionsOption","summary":"Delete a Shipping Option","description":"Deletes a Shipping Option.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Shipping Option.","schema":{"type":"string"}}],"tags":["Shipping Option"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Shipping Option."},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"get":{"operationId":"GetShippingOptionsOption","summary":"Retrieve a Shipping Option","description":"Retrieves a Shipping Option.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Shipping Option.","schema":{"type":"string"}}],"tags":["Shipping Option"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_option":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostShippingOptionsOption","summary":"Update Shipping Option","description":"Updates a Shipping Option","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Shipping Option.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the Shipping Option","type":"string"},"amount":{"description":"The amount to charge for the Shipping Option.","type":"integer"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available.","type":"array","items":{"properties":{"type":{"description":"The type of the requirement","type":"string","enum":["max_subtotal","min_subtotal"]},"amount":{"description":"The amount to compare with.","type":"integer"}}}}}}}}},"tags":["Shipping Option"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_option":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/shipping-profiles":{"post":{"operationId":"PostShippingProfiles","summary":"Create a Shipping Profile","description":"Creates a Shipping Profile","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the Shipping Profile","type":"string"}}}}}},"tags":["Shipping Profile"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_profile":{"title":"Shipping Profile","description":"Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products.","x-resourceId":"shipping_profile","properties":{"id":{"description":"The id of the Shipping Profile. This value will be prefixed with `sp_`.","type":"string"},"name":{"description":"The name given to the Shipping profile - this may be displayed to the Customer.","type":"string"},"type":{"description":"The type of the Shipping Profile, may be `default`, `gift_card` or `custom`.","type":"string","enum":["default","gift_card","custom"]},"products":{"description":"The Products that the Shipping Profile defines Shipping Options for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_options":{"description":"The Shipping Options that can be used to fulfill the Products in the Shipping Profile.","type":"array","items":{"anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"get":{"operationId":"GetShippingProfiles","summary":"List Shipping Profiles","description":"Retrieves a list of Shipping Profile.","tags":["Shipping Profile"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_profiles":{"type":"array","items":{"title":"Shipping Profile","description":"Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products.","x-resourceId":"shipping_profile","properties":{"id":{"description":"The id of the Shipping Profile. This value will be prefixed with `sp_`.","type":"string"},"name":{"description":"The name given to the Shipping profile - this may be displayed to the Customer.","type":"string"},"type":{"description":"The type of the Shipping Profile, may be `default`, `gift_card` or `custom`.","type":"string","enum":["default","gift_card","custom"]},"products":{"description":"The Products that the Shipping Profile defines Shipping Options for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_options":{"description":"The Shipping Options that can be used to fulfill the Products in the Shipping Profile.","type":"array","items":{"anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/shipping-profiles/{id}":{"delete":{"operationId":"DeleteShippingProfilesProfile","summary":"Delete a Shipping Profile","description":"Deletes a Shipping Profile.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Shipping Profile.","schema":{"type":"string"}}],"tags":["Shipping Profile"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"id":{"type":"string","description":"The id of the deleted Shipping Profile."},"object":{"type":"string","description":"The type of the object that was deleted."},"deleted":{"type":"boolean"}}}}}}}},"get":{"operationId":"GetShippingProfilesProfile","summary":"Retrieve a Shipping Profile","description":"Retrieves a Shipping Profile.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Shipping Profile.","schema":{"type":"string"}}],"tags":["Shipping Profile"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_profile":{"title":"Shipping Profile","description":"Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products.","x-resourceId":"shipping_profile","properties":{"id":{"description":"The id of the Shipping Profile. This value will be prefixed with `sp_`.","type":"string"},"name":{"description":"The name given to the Shipping profile - this may be displayed to the Customer.","type":"string"},"type":{"description":"The type of the Shipping Profile, may be `default`, `gift_card` or `custom`.","type":"string","enum":["default","gift_card","custom"]},"products":{"description":"The Products that the Shipping Profile defines Shipping Options for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_options":{"description":"The Shipping Options that can be used to fulfill the Products in the Shipping Profile.","type":"array","items":{"anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostShippingProfilesProfile","summary":"Update a Shipping Profiles","description":"Updates a Shipping Profile","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Shipping Profile.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the Shipping Profile","type":"string"}}}}}},"tags":["Shipping Profile"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_profiles":{"title":"Shipping Profile","description":"Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products.","x-resourceId":"shipping_profile","properties":{"id":{"description":"The id of the Shipping Profile. This value will be prefixed with `sp_`.","type":"string"},"name":{"description":"The name given to the Shipping profile - this may be displayed to the Customer.","type":"string"},"type":{"description":"The type of the Shipping Profile, may be `default`, `gift_card` or `custom`.","type":"string","enum":["default","gift_card","custom"]},"products":{"description":"The Products that the Shipping Profile defines Shipping Options for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_options":{"description":"The Shipping Options that can be used to fulfill the Products in the Shipping Profile.","type":"array","items":{"anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/swaps":{"get":{"operationId":"GetSwaps","summary":"List Swaps","description":"Retrieves a list of Swaps.","tags":["Swap"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"swaps":{"type":"array","items":{"title":"Swap","description":"Swaps can be created when a Customer wishes to exchange Products that they have purchased to different Products. Swaps consist of a Return of previously purchased Products and a Fulfillment of new Products, the amount paid for the Products being returned will be used towards payment for the new Products. In the case where the amount paid for the the Products being returned exceed the amount to be paid for the new Products, a Refund will be issued for the difference.","x-resourceId":"swap","properties":{"id":{"description":"The id of the Swap. This value will be prefixed with `swap_`.","type":"string"},"fulfillment_status":{"description":"The status of the Fulfillment of the Swap.","type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"description":"The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.","type":"string","enum":["not_paid","awaiting","captured","canceled","difference_refunded","requires_action"]},"order_id":{"description":"The id of the Order where the Line Items to be returned where purchased.","type":"string"},"additional_items":{"description":"The new Line Items to ship to the Customer.","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"return_order":{"description":"The Return that is issued for the return part of the Swap.","anyOf":[{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"fulfillments":{"description":"The Fulfillments used to send the new Line Items.","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"payment":{"description":"The Payment authorized when the Swap requires an additional amount to be charged from the Customer.","anyOf":[{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"difference_due":{"description":"The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products.","type":"integer"},"shipping_address":{"description":"The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_methods":{"description":"The Shipping Methods used to fulfill the addtional items purchased.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"cart_id":{"description":"The id of the Cart that the Customer will use to confirm the Swap.","type":"string"},"confirmed_at":{"description":"The date with timezone at which the Swap was confirmed by the Customer.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/store/currencies/{code}":{"post":{"operationId":"PostStoreCurrenciesCode","summary":"Add a Currency Code","description":"Adds a Currency Code to the available currencies.","parameters":[{"in":"path","name":"code","required":true,"description":"The 3 character ISO currency code.","schema":{"type":"string"}}],"tags":["Store"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"store":{"title":"Store","description":"Holds settings for the Store, such as name, currencies, etc.","x-resourceId":"store","properties":{"id":{"description":"The id of the Store. This value will be prefixed with `store_`.","type":"string"},"name":{"description":"The name of the Store - this may be displayed to the Customer.","type":"string"},"default_currency_code":{"description":"The default currency code used when no other currency code is specified.","type":"string"},"currencies":{"description":"The currencies that are enabled for the Store.","type":"array","items":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}}},"swap_link_template":{"description":"A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"delete":{"operationId":"DeleteStoreCurrenciesCode","summary":"Remvoe a Currency Code","description":"Removes a Currency Code from the available currencies.","parameters":[{"in":"path","name":"code","required":true,"description":"The 3 character ISO currency code.","schema":{"type":"string"}}],"tags":["Store"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"store":{"title":"Store","description":"Holds settings for the Store, such as name, currencies, etc.","x-resourceId":"store","properties":{"id":{"description":"The id of the Store. This value will be prefixed with `store_`.","type":"string"},"name":{"description":"The name of the Store - this may be displayed to the Customer.","type":"string"},"default_currency_code":{"description":"The default currency code used when no other currency code is specified.","type":"string"},"currencies":{"description":"The currencies that are enabled for the Store.","type":"array","items":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}}},"swap_link_template":{"description":"A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/store":{"get":{"operationId":"GetStore","summary":"Retrieve Store details.","description":"Retrieves the Store details","tags":["Store"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"store":{"title":"Store","description":"Holds settings for the Store, such as name, currencies, etc.","x-resourceId":"store","properties":{"id":{"description":"The id of the Store. This value will be prefixed with `store_`.","type":"string"},"name":{"description":"The name of the Store - this may be displayed to the Customer.","type":"string"},"default_currency_code":{"description":"The default currency code used when no other currency code is specified.","type":"string"},"currencies":{"description":"The currencies that are enabled for the Store.","type":"array","items":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}}},"swap_link_template":{"description":"A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}},"post":{"operationId":"PostStore","summary":"Update Store details.","description":"Updates the Store details","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the Store","type":"string"},"swap_link_template":{"description":"A template for Swap links - use `{{cart_id}}` to insert the Swap Cart id","type":"string"},"default_currency_code":{"description":"The default currency code for the Store.","type":"string"}}}}}},"tags":["Store"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"store":{"title":"Store","description":"Holds settings for the Store, such as name, currencies, etc.","x-resourceId":"store","properties":{"id":{"description":"The id of the Store. This value will be prefixed with `store_`.","type":"string"},"name":{"description":"The name of the Store - this may be displayed to the Customer.","type":"string"},"default_currency_code":{"description":"The default currency code used when no other currency code is specified.","type":"string"},"currencies":{"description":"The currencies that are enabled for the Store.","type":"array","items":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}}},"swap_link_template":{"description":"A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/store/payment-providers":{"get":{"operationId":"GetStorePaymentProviders","summary":"Retrieve configured Payment Providers","description":"Retrieves the configured Payment Providers","tags":["Store"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"payment_providers":{"type":"array","items":{"title":"Store","description":"Holds settings for the Store, such as name, currencies, etc.","x-resourceId":"store","properties":{"id":{"description":"The id of the Store. This value will be prefixed with `store_`.","type":"string"},"name":{"description":"The name of the Store - this may be displayed to the Customer.","type":"string"},"default_currency_code":{"description":"The default currency code used when no other currency code is specified.","type":"string"},"currencies":{"description":"The currencies that are enabled for the Store.","type":"array","items":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}}},"swap_link_template":{"description":"A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/variants":{"get":{"operationId":"GetVariants","summary":"List Product Variants.","description":"Retrieves a list of Product Variants","tags":["Product Variant"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"variants":{"type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}}},"components":{"schemas":{"address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}},"claim_image":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"claim_item":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"claim_order":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"claim_tag":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}},"currency":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"discount_rule":{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"fulfillment_item":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}},"fulfillment_provider":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}},"fulfillment":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"gift_card_transaction":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}},"gift_card":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"image":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"line_item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"money_amount":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}},"notification_provider":{"title":"Notification Provider","description":"Represents a notification provider plugin and holds its installation status.","x-resourceId":"notification_provider","properties":{"id":{"description":"The id of the notification provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}},"notification":{"title":"Notification","description":"Notifications a communications sent via Notification Providers as a reaction to internal events such as `order.placed`. Notifications can be used to show a chronological timeline for communications sent to a Customer regarding an Order, and enables resends.","x-resourceId":"notification","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"customer_id":{"description":"The id of the Customer that the Notification was sent to.","type":"string"},"customer":{"description":"The Customer that the Notification was sent to.","anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"resends":{"description":"The resends that have been completed after the original Notification.","type":"array","items":{"title":"Notification Resend","description":"A resend of a Notification.","x-resourceId":"notification_resend","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"notification_resend":{"title":"Notification Resend","description":"A resend of a Notification.","x-resourceId":"notification_resend","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}},"payment_provider":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_collection":{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_option_value":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_option":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_tag":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_type":{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"refund":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"return_item":{"title":"Return Item","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","properties":{"return_id":{"description":"The id of the Return that the Return Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Return Item references.","type":"string"},"item":{"description":"The Line Item that the Return Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Return.","type":"integer"},"is_requested":{"description":"Whether the Return Item was requested initially or received unexpectedly in the warehouse.","type":"boolean"},"requested_quantity":{"description":"The quantity that was originally requested to be returned.","type":"integer"},"recieved_quantity":{"description":"The quantity that was received in the warehouse.","type":"integer"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"return":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_method":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}},"shipping_option_requirement":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}},"shipping_option":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_profile":{"title":"Shipping Profile","description":"Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products.","x-resourceId":"shipping_profile","properties":{"id":{"description":"The id of the Shipping Profile. This value will be prefixed with `sp_`.","type":"string"},"name":{"description":"The name given to the Shipping profile - this may be displayed to the Customer.","type":"string"},"type":{"description":"The type of the Shipping Profile, may be `default`, `gift_card` or `custom`.","type":"string","enum":["default","gift_card","custom"]},"products":{"description":"The Products that the Shipping Profile defines Shipping Options for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_options":{"description":"The Shipping Options that can be used to fulfill the Products in the Shipping Profile.","type":"array","items":{"anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"store":{"title":"Store","description":"Holds settings for the Store, such as name, currencies, etc.","x-resourceId":"store","properties":{"id":{"description":"The id of the Store. This value will be prefixed with `store_`.","type":"string"},"name":{"description":"The name of the Store - this may be displayed to the Customer.","type":"string"},"default_currency_code":{"description":"The default currency code used when no other currency code is specified.","type":"string"},"currencies":{"description":"The currencies that are enabled for the Store.","type":"array","items":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}}},"swap_link_template":{"description":"A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"swap":{"title":"Swap","description":"Swaps can be created when a Customer wishes to exchange Products that they have purchased to different Products. Swaps consist of a Return of previously purchased Products and a Fulfillment of new Products, the amount paid for the Products being returned will be used towards payment for the new Products. In the case where the amount paid for the the Products being returned exceed the amount to be paid for the new Products, a Refund will be issued for the difference.","x-resourceId":"swap","properties":{"id":{"description":"The id of the Swap. This value will be prefixed with `swap_`.","type":"string"},"fulfillment_status":{"description":"The status of the Fulfillment of the Swap.","type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"description":"The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.","type":"string","enum":["not_paid","awaiting","captured","canceled","difference_refunded","requires_action"]},"order_id":{"description":"The id of the Order where the Line Items to be returned where purchased.","type":"string"},"additional_items":{"description":"The new Line Items to ship to the Customer.","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"return_order":{"description":"The Return that is issued for the return part of the Swap.","anyOf":[{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"fulfillments":{"description":"The Fulfillments used to send the new Line Items.","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"payment":{"description":"The Payment authorized when the Swap requires an additional amount to be charged from the Customer.","anyOf":[{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"difference_due":{"description":"The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products.","type":"integer"},"shipping_address":{"description":"The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_methods":{"description":"The Shipping Methods used to fulfill the addtional items purchased.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"cart_id":{"description":"The id of the Cart that the Customer will use to confirm the Swap.","type":"string"},"confirmed_at":{"description":"The date with timezone at which the Swap was confirmed by the Customer.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"tracking_link":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"user":{"title":"User","description":"Represents a User who can manage store settings.","x-resourceId":"user","properties":{"id":{"description":"The unique id of the User. This will be prefixed with `usr_`","type":"string"},"email":{"description":"The email of the User","type":"string"},"first_name":{"type":"string"},"last_name":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}} \ No newline at end of file diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml new file mode 100644 index 0000000000..0d40763afb --- /dev/null +++ b/docs/api/admin-spec3.yaml @@ -0,0 +1,5931 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: Medusa Admin API + license: + name: MIT +tags: + - name: Auth + description: >- + Auth endpoints allows authorization of admin Users and manages their + sessions. + - name: Collection + x-resourceId: product_collection + - name: Customer + x-resourceId: customer + - name: Discount + x-resourceId: discount + - name: Gift Card + x-resourceId: gift_card + - name: Notification + x-resourceId: notification + - name: Order + x-resourceId: order + - name: Product + x-resourceId: product + - name: Region + x-resourceId: region + - name: Return + x-resourceId: return + - name: Shipping Option + x-resourceId: shipping_option + - name: Shipping Profile + x-resourceId: shipping_profile + - name: Swap + x-resourceId: swap + - name: Product Variant + x-resourceId: product_variant +servers: + - url: 'https://api.medusa-commerce.com/admin' +paths: + /auth: + post: + operationId: PostAuth + summary: Authenticate a User + description: Logs a User in and authorizes them to manage Store settings. + parameters: [] + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/user' + requestBody: + content: + application/json: + schema: + type: object + required: + - email + - password + properties: + email: + type: string + description: The User's email. + password: + type: string + description: The User's password. + get: + operationId: GetAuth + summary: Get Session + description: Gets the currently logged in User. + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/user' + /collections: + post: + operationId: PostCollections + summary: Create a Product Collection + description: Creates a Product Collection. + requestBody: + content: + application/json: + schema: + required: + - title + properties: + title: + type: string + description: The title to identify the Collection by. + handle: + type: string + description: >- + An optional handle to be used in slugs, if none is provided + we will kebab-case the title. + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Collection + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + collection: + $ref: '#/components/schemas/product_collection' + get: + operationId: GetCollections + summary: List Product Collections + description: Retrieve a list of Product Collection. + tags: + - Collection + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + collection: + $ref: '#/components/schemas/product_collection' + '/collections/{id}': + delete: + operationId: DeleteCollectionsCollection + summary: Delete a Product Collection + description: Deletes a Product Collection. + parameters: + - in: path + name: id + required: true + description: The id of the Collection. + schema: + type: string + tags: + - Collection + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Collection + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + get: + operationId: GetCollectionsCollection + summary: Retrieve a Product Collection + description: Retrieves a Product Collection. + parameters: + - in: path + name: id + required: true + description: The id of the Product Collection + schema: + type: string + tags: + - Collection + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + collection: + $ref: '#/components/schemas/product_collection' + post: + operationId: PostCollectionsCollection + summary: Update a Product Collection + description: Updates a Product Collection. + parameters: + - in: path + name: id + required: true + description: The id of the Collection. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + title: + type: string + description: The title to identify the Collection by. + handle: + type: string + description: >- + An optional handle to be used in slugs, if none is provided + we will kebab-case the title. + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Collection + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + collection: + $ref: '#/components/schemas/product_collection' + /customers: + post: + operationId: PostCustomers + summary: Create a Customer + description: Creates a Customer. + parameters: [] + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + requestBody: + content: + application/json: + schema: + type: object + required: + - email + - first_name + - last_name + properties: + email: + type: string + description: The Customer's email address. + first_name: + type: string + description: The Customer's first name. + last_name: + type: string + description: The Customer's last name. + phone: + type: string + description: The Customer's phone number. + get: + operationId: GetCustomers + summary: List Customers + description: Retrieves a list of Customers. + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '/customers/{id}': + get: + operationId: GetCustomersCustomer + summary: Retrieve a Customer + description: Retrieves a Customer. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + post: + operationId: PostCustomersCustomer + summary: Update a Customer + description: Updates a Customer. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + first_name: + type: string + description: The Customer's first name. + last_name: + type: string + description: The Customer's last name. + phone: + description: The Customer's phone number. + type: object + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '/discounts/{id}/regions/{region_id}': + post: + operationId: PostDiscountsDiscountRegionsRegion + summary: Adds Region availability + description: Adds a Region to the list of Regions that a Discount can be used in. + parameters: + - in: path + name: id + required: true + description: The id of the Discount. + schema: + type: string + - in: path + name: region_id + required: true + description: The id of the Region. + schema: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + delete: + operationId: DeleteDiscountsDiscountRegionsRegion + summary: Remove Region availability + description: >- + Removes a Region from the list of Regions that a Discount can be used + in. + parameters: + - in: path + name: id + required: true + description: The id of the Discount. + schema: + type: string + - in: path + name: region_id + required: true + description: The id of the Region. + schema: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + '/discounts/{id}/products/{product_id}': + post: + operationId: DeleteDiscountsDiscountProductsProduct + summary: Remove Product availability + description: >- + Removes a Product from the list of Products that a Discount can be used + for. + parameters: + - in: path + name: id + required: true + description: The id of the Discount. + schema: + type: string + - in: path + name: product_id + required: true + description: The id of the Product. + schema: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + /discounts: + post: + operationId: PostDiscounts + summary: Creates a Discount + description: >- + Creates a Discount with a given set of rules that define how the + Discount behaves. + requestBody: + content: + application/json: + schema: + properties: + code: + type: string + description: A unique code that will be used to redeem the Discount + is_dynamic: + type: string + description: >- + Whether the Discount should have multiple instances of + itself, each with a different code. This can be useful for + automatically generated codes that all have to follow a + common set of rules. + rule: + description: The Discount Rule that defines how Discounts are calculated + oneOf: + - $ref: '#/components/schemas/discount_rule' + is_disabled: + type: boolean + description: >- + Whether the Discount code is disabled on creation. You will + have to enable it later to make it available to Customers. + starts_at: + type: string + format: date-time + description: The time at which the Discount should be available. + ends_at: + type: string + format: date-time + description: >- + The time at which the Discount should no longer be + available. + regions: + description: >- + A list of Region ids representing the Regions in which the + Discount can be used. + type: array + items: + type: string + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + get: + operationId: GetDiscounts + summary: List Discounts + description: Retrieves a list of Discounts + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + '/discounts/{id}/dynamic-codes': + post: + operationId: PostDiscountsDiscountDynamicCodes + summary: Create a dynamic Discount code + description: >- + Creates a unique code that can map to a parent Discount. This is useful + if you want to automatically generate codes with the same behaviour. + parameters: + - in: path + name: id + required: true + description: The id of the Discount to create the dynamic code from." + schema: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + requestBody: + content: + application/json: + schema: + type: object + required: + - code + properties: + code: + type: string + description: The unique code that will be used to redeem the Discount. + metadata: + type: object + description: >- + An optional set of key-value paris to hold additional + information. + '/discounts/{id}': + delete: + operationId: DeleteDiscountsDiscount + summary: Delete a Discount + description: Deletes a Discount. + parameters: + - in: path + name: id + required: true + description: The id of the Discount + schema: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Discount + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + get: + operationId: GetDiscountsDiscount + summary: Retrieve a Discount + description: Retrieves a Discount + parameters: + - in: path + name: id + required: true + description: The id of the Discount + schema: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + post: + operationId: PostDiscountsDiscount + summary: Update a Discount + description: >- + Updates a Discount with a given set of rules that define how the + Discount behaves. + parameters: + - in: path + name: id + required: true + description: The id of the Discount. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + code: + type: string + description: A unique code that will be used to redeem the Discount + is_dynamic: + type: string + description: >- + Whether the Discount should have multiple instances of + itself, each with a different code. This can be useful for + automatically generated codes that all have to follow a + common set of rules. + rule: + description: The Discount Rule that defines how Discounts are calculated + oneOf: + - $ref: '#/components/schemas/discount_rule' + is_disabled: + type: boolean + description: >- + Whether the Discount code is disabled on creation. You will + have to enable it later to make it available to Customers. + starts_at: + type: string + format: date-time + description: The time at which the Discount should be available. + ends_at: + type: string + format: date-time + description: >- + The time at which the Discount should no longer be + available. + regions: + description: >- + A list of Region ids representing the Regions in which the + Discount can be used. + type: array + items: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + '/discounts/{id}/dynamic-codes/{code}': + delete: + operationId: DeleteDiscountsDiscountDynamicCodesCode + summary: Delete a dynamic code + description: Deletes a dynamic code from a Discount. + parameters: + - in: path + name: id + required: true + description: The id of the Discount + schema: + type: string + - in: path + name: code + required: true + description: The id of the Discount + schema: + type: string + tags: + - Discount + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + discount: + $ref: '#/components/schemas/discount' + /notifications: + get: + operationId: GetNotifications + summary: List Notifications + description: Retrieves a list of Notifications. + tags: + - Notification + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + notifications: + type: array + items: + $ref: '#/components/schemas/notification' + '/notifications/{id}/resend': + post: + operationId: PostNotificationsNotificationResend + summary: Resend Notification + description: >- + Resends a previously sent notifications, with the same data but + optionally to a different address + parameters: + - in: path + name: id + required: true + description: The id of the Notification + schema: + type: string + tags: + - Notification + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + notification: + $ref: '#/components/schemas/notification' + /gift-cards: + post: + operationId: PostGiftCards + summary: Create a Gift Card + description: >- + Creates a Gift Card that can redeemed by its unique code. The Gift Card + is only valid within 1 region. + requestBody: + content: + application/json: + schema: + properties: + value: + type: integer + description: >- + The value (excluding VAT) that the Gift Card should + represent. + is_disabled: + type: boolean + description: >- + Whether the Gift Card is disabled on creation. You will have + to enable it later to make it available to Customers. + ends_at: + type: string + format: date-time + description: >- + The time at which the Gift Card should no longer be + available. + region_id: + description: The id of the Region in which the Gift Card can be used. + type: array + items: + type: string + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Gift Card + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + gift_card: + $ref: '#/components/schemas/gift_card' + get: + operationId: GetGiftCards + summary: List Gift Cards + description: Retrieves a list of Gift Cards. + tags: + - Gift Card + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + gift_cards: + type: array + items: + $ref: '#/components/schemas/gift_card' + '/gift-cards/{id}': + delete: + operationId: DeleteGiftCardsGiftCard + summary: Delete a Gift Card + description: Deletes a Gift Card + parameters: + - in: path + name: id + required: true + description: The id of the Gift Card to delete. + schema: + type: string + tags: + - Gift Card + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Gift Card + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + get: + operationId: GetGiftCardsGiftCard + summary: Retrieve a Gift Card + description: Retrieves a Gift Card. + parameters: + - in: path + name: id + required: true + description: The id of the Gift Card. + schema: + type: string + tags: + - Gift Card + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + gift_card: + $ref: '#/components/schemas/gift_card' + post: + operationId: PostGiftCardsGiftCard + summary: Create a Gift Card + description: >- + Creates a Gift Card that can redeemed by its unique code. The Gift Card + is only valid within 1 region. + parameters: + - in: path + name: id + required: true + description: The id of the Gift Card. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + balance: + type: integer + description: >- + The value (excluding VAT) that the Gift Card should + represent. + is_disabled: + type: boolean + description: >- + Whether the Gift Card is disabled on creation. You will have + to enable it later to make it available to Customers. + ends_at: + type: string + format: date-time + description: >- + The time at which the Gift Card should no longer be + available. + region_id: + description: The id of the Region in which the Gift Card can be used. + type: array + items: + type: string + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Gift Card + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + gift_card: + $ref: '#/components/schemas/gift_card' + '/orders/{id}/shipping-methods': + post: + operationId: PostOrdersOrderShippingMethods + summary: Add a Shipping Method + description: >- + Adds a Shipping Method to an Order. If another Shipping Method exists + with the same Shipping Profile, the previous Shipping Method will be + replaced. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + requestBody: + content: + application/json: + schema: + type: object + required: + - price + - option_id + - data + properties: + price: + type: integer + description: >- + The price (excluding VAT) that should be charged for the + Shipping Method + option_id: + type: string + description: >- + The id of the Shipping Option to create the Shipping Method + from. + data: + type: object + description: >- + The data required for the Shipping Option to create a + Shipping Method. This will depend on the Fulfillment + Provider. + '/orders/{id}/cancel': + post: + operationId: PostOrdersOrderCancel + summary: Cancel an Order + description: >- + Registers an Order as canceled. This triggers a flow that will cancel + any created Fulfillments and Payments, may fail if the Payment or + Fulfillment Provider is unable to cancel the Payment/Fulfillment. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/capture': + post: + operationId: PostOrdersOrderCapture + summary: Capture an Order + description: Captures all the Payments associated with an Order. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/claims/{claim_id}/shipments': + post: + operationId: PostOrdersOrderClaimsClaimShipments + summary: Create Claim Shipment + description: Registers a Claim Fulfillment as shipped. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: claim_id + required: true + description: The id of the Claim. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + fulfillment_id: + description: The id of the Fulfillment. + type: string + tracking_numbers: + description: The tracking numbers for the shipment. + type: array + items: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/order/{id}/claims': + post: + operationId: PostOrdersOrderClaims + summary: Create a Claim + description: Creates a Claim. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + type: + description: >- + The type of the Claim. This will determine how the Claim is + treated: `replace` Claims will result in a Fulfillment with + new items being created, while a `refund` Claim will refund + the amount paid for the claimed items. + type: string + enum: + - replace + - refund + claim_items: + description: The Claim Items that the Claim will consist of. + type: array + items: + properties: + item_id: + description: The id of the Line Item that will be claimed. + type: string + quantity: + description: The number of items that will be returned + type: integer + note: + description: >- + Short text describing the Claim Item in further + detail. + type: string + reason: + description: The reason for the Claim + type: string + enum: + - missing_item + - wrong_item + - production_failure + - other + tags: + description: A list o tags to add to the Claim Item + type: array + items: + type: string + images: + description: >- + A list of image URL's that will be associated with the + Claim + items: + type: string + return_shipping: + description: >- + Optional details for the Return Shipping Method, if the + items are to be sent back. + type: object + properties: + option_id: + type: string + description: >- + The id of the Shipping Option to create the Shipping + Method from. + price: + type: integer + description: The price to charge for the Shipping Method. + additional_items: + description: >- + The new items to send to the Customer when the Claim type is + Replace. + type: array + items: + properties: + variant_id: + description: The id of the Product Variant to ship. + type: string + quantity: + description: The quantity of the Product Variant to ship. + type: integer + shipping_methods: + description: The Shipping Methods to send the additional Line Items with. + type: array + items: + properties: + id: + description: The id of an existing Shipping Method + type: string + option_id: + description: >- + The id of the Shipping Option to create a Shipping + Method from + type: string + price: + description: The price to charge for the Shipping Method + type: integer + refund_amount: + description: >- + The amount to refund the Customer when the Claim type is + `refund`. + type: integer + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/fulfillments': + post: + operationId: PostOrdersOrderFulfillments + summary: Create a Fulfillment + description: >- + Creates a Fulfillment of an Order - will notify Fulfillment Providers to + prepare a shipment. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + items: + description: The Line Items to include in the Fulfillment. + type: array + items: + properties: + item_id: + description: The id of Line Item to fulfill. + type: string + quantity: + description: The quantity of the Line Item to fulfill. + type: integer + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/shipment': + post: + operationId: PostOrdersOrderShipment + summary: Create a Shipment + description: Registers a Fulfillment as shipped. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + fulfillment_id: + description: The id of the Fulfillment. + type: string + tracking_numbers: + description: The tracking numbers for the shipment. + type: array + items: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/swaps/{swap_id}/shipments': + post: + operationId: PostOrdersOrderSwapsSwapShipments + summary: Create Swap Shipment + description: Registers a Swap Fulfillment as shipped. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: swap_id + required: true + description: The id of the Swap. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + fulfillment_id: + description: The id of the Fulfillment. + type: string + tracking_numbers: + description: The tracking numbers for the shipment. + type: array + items: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/order/{id}/swaps': + post: + operationId: PostOrdersOrderSwaps + summary: Create a Swap + description: >- + Creates a Swap. Swaps are used to handle Return of previously purchased + goods and Fulfillment of replacements simultaneously. + parameters: + - in: path + name: id + required: true + description: The id of the Swap. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + return_items: + description: The Line Items to return as part of the Swap. + type: array + items: + properties: + item_id: + description: The id of the Line Item that will be claimed. + type: string + quantity: + description: The number of items that will be returned + type: integer + return_shipping: + description: How the Swap will be returned. + type: object + properties: + option_id: + type: string + description: >- + The id of the Shipping Option to create the Shipping + Method from. + price: + type: integer + description: The price to charge for the Shipping Method. + additional_items: + description: The new items to send to the Customer. + type: array + items: + properties: + variant_id: + description: The id of the Product Variant to ship. + type: string + quantity: + description: The quantity of the Product Variant to ship. + type: integer + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/order/{id}/metadata/{key}': + delete: + operationId: DeleteOrdersOrderMetadataKey + summary: Delete Metadata + description: Deletes a metadata key. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: key + required: true + description: The metadata key. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/claims/{claim_id}/fulfillments': + post: + operationId: PostOrdersOrderClaimsClaimFulfillments + summary: Create a Claim Fulfillment + description: Creates a Fulfillment for a Claim. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: claim_id + required: true + description: The id of the Claim. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/swaps/{swap_id}/fulfillments': + post: + operationId: PostOrdersOrderSwapsSwapFulfillments + summary: Create a Swap Fulfillment + description: Creates a Fulfillment for a Swap. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: swap_id + required: true + description: The id of the Swap. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}': + get: + operationId: GetOrdersOrder + summary: Retrieve an Order + description: Retrieves an Order + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + /orders: + get: + operationId: GetOrders + summary: List Orders + description: Retrieves an list of Orders + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/swaps/{swap_id}/process-payment': + post: + operationId: PostOrdersOrderSwapsSwapProcessPayment + summary: Process a Swap difference + description: >- + When there are differences between the returned and shipped Products in + a Swap, the difference must be processed. Either a Refund will be issued + or a Payment will be captured. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: swap_id + required: true + description: The id of the Swap. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/returns/{return_id}/receive': + post: + operationId: PostOrdersOrderReturnsReturnReceive + summary: Receive a Return + description: Registers a Return as received. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: return_id + required: true + description: The id of the Return. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + items: + description: The Line Items that have been received. + type: array + items: + properties: + item_id: + description: The id of the Line Item. + type: string + quantity: + description: The quantity of the Line Item. + type: integer + refund: + description: The amount to refund. + type: integer + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/swaps/{swap_id}/receive': + post: + operationId: PostOrdersOrderSwapsSwapReceive + summary: Receive a Swap + description: Registers a Swap as received. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: swap_id + required: true + description: The id of the Swap. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + items: + description: The Line Items that have been received. + type: array + items: + properties: + item_id: + description: The id of the Line Item. + type: string + quantity: + description: The quantity of the Line Item. + type: integer + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/refunds': + post: + operationId: PostOrdersOrderRefunds + summary: Create a Refund + description: Issues a Refund. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + requestBody: + content: + application/json: + schema: + required: + - amount + - reason + properties: + amount: + description: The amount to refund. + type: integer + reason: + description: The reason for the Refund. + type: string + note: + description: A not with additional details about the Refund. + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}/returns': + post: + operationId: PostOrdersOrderReturns + summary: Request a Return + description: >- + Requests a Return. If applicable a return label will be created and + other plugins notified. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + items: + description: The Line Items that will be returned. + type: array + items: + properties: + item_id: + description: The id of the Line Item. + type: string + quantity: + description: The quantity of the Line Item. + type: integer + return_shipping: + description: >- + The Shipping Method to be used to handle the return + shipment. + type: object + properties: + option_id: + type: string + description: >- + The id of the Shipping Option to create the Shipping + Method from. + price: + type: integer + description: The price to charge for the Shipping Method. + receive_now: + description: >- + A flag to indicate if the Return should be registerd as + received immediately. + type: boolean + refund: + description: The amount to refund. + type: integer + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/order/{id}/claims/{claim_id}': + post: + operationId: PostOrdersOrderClaimsClaim + summary: Update a Claim + description: Updates a Claim. + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + - in: path + name: claim_id + required: true + description: The id of the Claim. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + claim_items: + description: The Claim Items that the Claim will consist of. + type: array + items: + properties: + id: + description: The id of the Claim Item. + type: string + item_id: + description: The id of the Line Item that will be claimed. + type: string + quantity: + description: The number of items that will be returned + type: integer + note: + description: >- + Short text describing the Claim Item in further + detail. + type: string + reason: + description: The reason for the Claim + type: string + enum: + - missing_item + - wrong_item + - production_failure + - other + tags: + description: A list o tags to add to the Claim Item + type: array + items: + type: string + images: + description: >- + A list of image URL's that will be associated with the + Claim + items: + type: string + shipping_methods: + description: The Shipping Methods to send the additional Line Items with. + type: array + items: + properties: + id: + description: The id of an existing Shipping Method + type: string + option_id: + description: >- + The id of the Shipping Option to create a Shipping + Method from + type: string + price: + description: The price to charge for the Shipping Method + type: integer + metadata: + description: >- + An optional set of key-value pairs to hold additional + information. + type: object + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/products/{id}/options': + post: + operationId: PostProductsProductOptions + summary: Add an Option + description: Adds a Product Option to a Product + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + title: + description: >- + The title the Product Option will be identified by i.e. + "Size" + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + /products: + post: + operationId: PostProducts + summary: Create a Product + description: Creates a Product + requestBody: + content: + application/json: + schema: + properties: + title: + description: The title of the Product + type: string + subtitle: + description: The subtitle of the Product + type: string + description: + description: A description of the Product. + type: string + is_giftcard: + description: >- + A flag to indicate if the Product represents a Gift Card. + Purchasing Products with this flag set to `true` will result + in a Gift Card being created. + type: boolean + images: + description: Images of the Product. + type: array + items: + type: string + thumbnail: + description: The thumbnail to use for the Product. + type: string + handle: + description: A unique handle to identify the Product by. + type: string + type: + description: The Product Type to associate the Product with. + type: object + properties: + value: + description: The value of the Product Type. + type: string + collection_id: + description: The id of the Collection the Product should belong to. + type: string + tags: + description: Tags to associate the Product with. + type: array + items: + properties: + id: + description: The id of an existing Tag. + type: string + value: + description: 'The value of the Tag, these will be upserted.' + type: string + options: + description: >- + The Options that the Product should have. These define on + which properties the Product's Product Variants will differ. + type: array + items: + properties: + title: + description: The title to identify the Product Option by. + type: string + variants: + description: A list of Product Variants to create with the Product. + type: array + items: + properties: + title: + description: The title to identify the Product Variant by. + type: string + sku: + description: The unique SKU for the Product Variant. + type: string + ean: + description: The EAN number of the item. + type: string + upc: + description: The UPC number of the item. + type: string + barcode: + description: A generic GTIN field for the Product Variant. + type: string + hs_code: + description: The Harmonized System code for the Product Variant. + type: string + inventory_quantity: + description: The amount of stock kept for the Product Variant. + type: integer + allow_backorder: + description: >- + Whether the Product Variant can be purchased when out + of stock. + type: boolean + manage_inventory: + description: >- + Whether Medusa should keep track of the inventory for + this Product Variant. + type: boolean + weight: + description: The wieght of the Product Variant. + type: string + length: + description: The length of the Product Variant. + type: string + height: + description: The height of the Product Variant. + type: string + width: + description: The width of the Product Variant. + type: string + origin_country: + description: The country of origin of the Product Variant. + type: string + mid_code: + description: >- + The Manufacturer Identification code for the Product + Variant. + type: string + material: + description: The material composition of the Product Variant. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + prices: + type: array + items: + properties: + region_id: + description: >- + The id of the Region for which the price is + used. + type: string + currency_code: + description: >- + The 3 character ISO currency code for which the + price will be used. + type: string + amount: + description: The amount to charge for the Product Variant. + type: integer + sale_amount: + description: >- + The sale amount to charge for the Product + Variant. + type: integer + options: + type: array + items: + properties: + value: + description: >- + The value to give for the Product Option at the + same index in the Product's `options` field. + type: string + weight: + description: The wieght of the Product. + type: string + length: + description: The length of the Product. + type: string + height: + description: The height of the Product. + type: string + width: + description: The width of the Product. + type: string + origin_country: + description: The country of origin of the Product. + type: string + mid_code: + description: The Manufacturer Identification code for the Product. + type: string + material: + description: The material composition of the Product. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + get: + operationId: GetProducts + summary: List Product + description: Retrieves a list of Product + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + count: + description: The number of Products. + type: integer + offset: + description: The offset of the Product query. + type: integer + limit: + description: The limit of the Product query. + type: integer + products: + type: array + items: + $ref: '#/components/schemas/product' + '/products/{id}/variants': + post: + operationId: PostProductsProductVariants + summary: Create a Product Variant + description: >- + Creates a Product Variant. Each Product Variant must have a unique + combination of Product Option Values. + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + title: + description: The title to identify the Product Variant by. + type: string + sku: + description: The unique SKU for the Product Variant. + type: string + ean: + description: The EAN number of the item. + type: string + upc: + description: The UPC number of the item. + type: string + barcode: + description: A generic GTIN field for the Product Variant. + type: string + hs_code: + description: The Harmonized System code for the Product Variant. + type: string + inventory_quantity: + description: The amount of stock kept for the Product Variant. + type: integer + allow_backorder: + description: >- + Whether the Product Variant can be purchased when out of + stock. + type: boolean + manage_inventory: + description: >- + Whether Medusa should keep track of the inventory for this + Product Variant. + type: boolean + weight: + description: The wieght of the Product Variant. + type: string + length: + description: The length of the Product Variant. + type: string + height: + description: The height of the Product Variant. + type: string + width: + description: The width of the Product Variant. + type: string + origin_country: + description: The country of origin of the Product Variant. + type: string + mid_code: + description: >- + The Manufacturer Identification code for the Product + Variant. + type: string + material: + description: The material composition of the Product Variant. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + prices: + type: array + items: + properties: + region_id: + description: The id of the Region for which the price is used. + type: string + currency_code: + description: >- + The 3 character ISO currency code for which the price + will be used. + type: string + amount: + description: The amount to charge for the Product Variant. + type: integer + sale_amount: + description: The sale amount to charge for the Product Variant. + type: integer + options: + type: array + items: + properties: + option_id: + description: The id of the Product Option to set the value for. + type: string + value: + description: The value to give for the Product Option. + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + get: + operationId: GetProductsProductVariants + summary: List a Product's Product Variants + description: Retrieves a list of the Product Variants associated with a Product. + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + variants: + type: array + items: + $ref: '#/components/schemas/product_variant' + '/products/{id}/options/{option_id}': + delete: + operationId: DeleteProductsProductOptionsOption + summary: Delete a Product Option + description: >- + Deletes a Product Option. Before a Product Option can be deleted all + Option Values for the Product Option must be the same. You may, for + example, have to delete some of your variants prior to deleting the + Product Option + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + - in: path + name: option_id + required: true + description: The id of the Product Option. + schema: + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Product Option + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + product: + $ref: '#/components/schemas/product' + post: + operationId: PostProductsProductOptionsOption + summary: Update a Product Option. + description: Updates a Product Option + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + - in: path + name: option_id + required: true + description: The id of the Product Option. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + title: + description: The title of the Product Option + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + '/products/{id}': + delete: + operationId: DeleteProductsProduct + summary: Delete a Product + description: Deletes a Product and it's associated Product Variants. + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Product. + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + get: + operationId: GetProductsProduct + summary: Retrieve a Product + description: Retrieves a Product. + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + post: + operationId: PostProductsProduct + summary: Update a Product + description: Updates a Product + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + title: + description: The title of the Product + type: string + subtitle: + description: The subtitle of the Product + type: string + description: + description: A description of the Product. + type: string + is_giftcard: + description: >- + A flag to indicate if the Product represents a Gift Card. + Purchasing Products with this flag set to `true` will result + in a Gift Card being created. + type: boolean + images: + description: Images of the Product. + type: array + items: + type: string + thumbnail: + description: The thumbnail to use for the Product. + type: string + handle: + description: A unique handle to identify the Product by. + type: string + type: + description: The Product Type to associate the Product with. + type: object + properties: + value: + description: The value of the Product Type. + type: string + collection_id: + description: The id of the Collection the Product should belong to. + type: string + tags: + description: Tags to associate the Product with. + type: array + items: + properties: + id: + description: The id of an existing Tag. + type: string + value: + description: 'The value of the Tag, these will be upserted.' + type: string + options: + description: >- + The Options that the Product should have. These define on + which properties the Product's Product Variants will differ. + type: array + items: + properties: + title: + description: The title to identify the Product Option by. + type: string + variants: + description: A list of Product Variants to create with the Product. + type: array + items: + properties: + title: + description: The title to identify the Product Variant by. + type: string + sku: + description: The unique SKU for the Product Variant. + type: string + ean: + description: The EAN number of the item. + type: string + upc: + description: The UPC number of the item. + type: string + barcode: + description: A generic GTIN field for the Product Variant. + type: string + hs_code: + description: The Harmonized System code for the Product Variant. + type: string + inventory_quantity: + description: The amount of stock kept for the Product Variant. + type: integer + allow_backorder: + description: >- + Whether the Product Variant can be purchased when out + of stock. + type: boolean + manage_inventory: + description: >- + Whether Medusa should keep track of the inventory for + this Product Variant. + type: boolean + weight: + description: The wieght of the Product Variant. + type: string + length: + description: The length of the Product Variant. + type: string + height: + description: The height of the Product Variant. + type: string + width: + description: The width of the Product Variant. + type: string + origin_country: + description: The country of origin of the Product Variant. + type: string + mid_code: + description: >- + The Manufacturer Identification code for the Product + Variant. + type: string + material: + description: The material composition of the Product Variant. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + prices: + type: array + items: + properties: + region_id: + description: >- + The id of the Region for which the price is + used. + type: string + currency_code: + description: >- + The 3 character ISO currency code for which the + price will be used. + type: string + amount: + description: The amount to charge for the Product Variant. + type: integer + sale_amount: + description: >- + The sale amount to charge for the Product + Variant. + type: integer + options: + type: array + items: + properties: + value: + description: >- + The value to give for the Product Option at the + same index in the Product's `options` field. + type: string + weight: + description: The wieght of the Product. + type: string + length: + description: The length of the Product. + type: string + height: + description: The height of the Product. + type: string + width: + description: The width of the Product. + type: string + origin_country: + description: The country of origin of the Product. + type: string + mid_code: + description: The Manufacturer Identification code for the Product. + type: string + material: + description: The material composition of the Product. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + '/products/{id}/variants/{variant_id}': + delete: + operationId: DeleteProductsProductVariantsVariant + summary: Delete a Product Variant + description: Deletes a Product Variant. + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + - in: path + name: variant_id + required: true + description: The id of the Product Variant. + schema: + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Product Variant. + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + post: + operationId: PostProductsProductVariantsVariant + summary: Update a Product Variant + description: Update a Product Variant. + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + - in: path + name: variant_id + required: true + description: The id of the Product Variant. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + title: + description: The title to identify the Product Variant by. + type: string + sku: + description: The unique SKU for the Product Variant. + type: string + ean: + description: The EAN number of the item. + type: string + upc: + description: The UPC number of the item. + type: string + barcode: + description: A generic GTIN field for the Product Variant. + type: string + hs_code: + description: The Harmonized System code for the Product Variant. + type: string + inventory_quantity: + description: The amount of stock kept for the Product Variant. + type: integer + allow_backorder: + description: >- + Whether the Product Variant can be purchased when out of + stock. + type: boolean + manage_inventory: + description: >- + Whether Medusa should keep track of the inventory for this + Product Variant. + type: boolean + weight: + description: The wieght of the Product Variant. + type: string + length: + description: The length of the Product Variant. + type: string + height: + description: The height of the Product Variant. + type: string + width: + description: The width of the Product Variant. + type: string + origin_country: + description: The country of origin of the Product Variant. + type: string + mid_code: + description: >- + The Manufacturer Identification code for the Product + Variant. + type: string + material: + description: The material composition of the Product Variant. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + prices: + type: array + items: + properties: + region_id: + description: The id of the Region for which the price is used. + type: string + currency_code: + description: >- + The 3 character ISO currency code for which the price + will be used. + type: string + amount: + description: The amount to charge for the Product Variant. + type: integer + sale_amount: + description: The sale amount to charge for the Product Variant. + type: integer + options: + type: array + items: + properties: + option_id: + description: The id of the Product Option to set the value for. + type: string + value: + description: The value to give for the Product Option. + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + /products/types: + get: + operationId: GetProductsTypes + summary: List Product Types + description: Retrieves a list of Product Types. + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + types: + type: array + items: + $ref: '#/components/schemas/product_type' + '/regions/{id}/countries': + post: + operationId: PostRegionsRegionCountries + summary: Add Country + description: Adds a Country to the list of Countries in a Region + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + country_code: + description: The 2 character ISO code for the Country. + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + '/regions/{id}/fulfillment-providers': + post: + operationId: PostRegionsRegionFulfillmentProviders + summary: Add Fulfillment Provider + description: Adds a Fulfillment Provider to a Region + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + provider_id: + description: The id of the Fulfillment Provider to add. + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + '/regions/{id}/payment-providers': + post: + operationId: PostRegionsRegionPaymentProviders + summary: Add Payment Provider + description: Adds a Payment Provider to a Region + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + provider_id: + description: The id of the Payment Provider to add. + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + /regions: + post: + operationId: PostRegions + summary: Create a Region + description: Creates a Region + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Region + type: string + currency_code: + description: The 3 character ISO currency code to use for the Region. + type: string + tax_code: + description: An optional tax code the Region. + type: string + tax_rate: + description: The tax rate to use on Orders in the Region. + type: number + payment_providers: + description: >- + A list of Payment Providers that should be enabled for the + Region + type: array + items: + type: string + fulfillment_providers: + description: >- + A list of Fulfillment Providers that should be enabled for + the Region + type: array + items: + type: string + countries: + description: A list of countries that should be included in the Region. + type: array + items: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + get: + operationId: GetRegions + summary: List Regions + description: Retrieves a list of Regions. + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + regions: + type: array + items: + $ref: '#/components/schemas/region' + '/regions/{id}/metadata/{key}': + delete: + operationId: DeleteRegionsRegionMetadataKey + summary: Delete Metadata + description: Deletes a metadata key. + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + - in: path + name: key + required: true + description: The metadata key. + schema: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + '/regions/{id}': + delete: + operationId: DeleteRegionsRegion + summary: Delete a Region + description: Deletes a Region. + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Region. + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + get: + operationId: GetRegionsRegion + summary: Retrieve a Region + description: Retrieves a Region. + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + post: + operationId: PostRegionsRegion + summary: Update a Region + description: Updates a Region + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Region + type: string + currency_code: + description: The 3 character ISO currency code to use for the Region. + type: string + tax_code: + description: An optional tax code the Region. + type: string + tax_rate: + description: The tax rate to use on Orders in the Region. + type: number + payment_providers: + description: >- + A list of Payment Providers that should be enabled for the + Region + type: array + items: + type: string + fulfillment_providers: + description: >- + A list of Fulfillment Providers that should be enabled for + the Region + type: array + items: + type: string + countries: + description: A list of countries that should be included in the Region. + type: array + items: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + '/regions/{id}/fulfillment-options': + get: + operationId: GetRegionsRegionFulfillmentOptions + summary: List Fulfillment Options available in the Region + description: Gathers all the fulfillment options available to in the Region. + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + fulfillment_options: + type: array + items: + type: object + '/regions/{id}/countries/{country_code}': + delete: + operationId: PostRegionsRegionCountriesCountry + summary: Remove Country + description: Removes a Country from the list of Countries in a Region + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + - in: path + name: country_code + required: true + description: The 2 character ISO code for the Country. + schema: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + '/regions/{id}/fulfillment-providers/{provider_id}': + delete: + operationId: PostRegionsRegionFulfillmentProvidersProvider + summary: Remove Fulfillment Provider + description: Removes a Fulfillment Provider. + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + - in: path + name: provider_id + required: true + description: The id of the Fulfillment Provider. + schema: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + '/regions/{id}/payment-providers/{provider_id}': + delete: + operationId: PostRegionsRegionPaymentProvidersProvider + summary: Remove Payment Provider + description: Removes a Payment Provider. + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + - in: path + name: provider_id + required: true + description: The id of the Payment Provider. + schema: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + /returns: + get: + operationId: GetReturns + summary: List Returns + description: Retrieves a list of Returns + tags: + - Return + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + returns: + type: array + items: + $ref: '#/components/schemas/return' + /shipping-options: + post: + operationId: PostShippingOptions + summary: Create Shipping Option + description: Creates a Shipping Option + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Shipping Option + type: string + region_id: + description: >- + The id of the Region in which the Shipping Option will be + available. + type: string + provider_id: + description: >- + The id of the Fulfillment Provider that handles the Shipping + Option. + type: string + profile_id: + description: >- + The id of the Shipping Profile to add the Shipping Option + to. + type: number + data: + description: >- + The data needed for the Fulfillment Provider to handle + shipping with this Shipping Option. + type: object + price_type: + description: The type of the Shipping Option price. + type: string + enum: + - flat_rate + - calculated + amount: + description: The amount to charge for the Shipping Option. + type: integer + requirements: + description: >- + The requirements that must be satisfied for the Shipping + Option to be available. + type: array + items: + properties: + type: + description: The type of the requirement + type: string + enum: + - max_subtotal + - min_subtotal + amount: + description: The amount to compare with. + type: integer + is_return: + description: Whether the Shipping Option defines a return shipment. + type: boolean + tags: + - Shipping Option + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_option: + $ref: '#/components/schemas/shipping_option' + get: + operationId: GetShippingOptions + summary: List Shipping Options + description: Retrieves a list of Shipping Options. + tags: + - Shipping Option + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_options: + type: array + items: + $ref: '#/components/schemas/shipping_option' + '/shipping-options/{id}': + delete: + operationId: DeleteShippingOptionsOption + summary: Delete a Shipping Option + description: Deletes a Shipping Option. + parameters: + - in: path + name: id + required: true + description: The id of the Shipping Option. + schema: + type: string + tags: + - Shipping Option + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Shipping Option. + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + get: + operationId: GetShippingOptionsOption + summary: Retrieve a Shipping Option + description: Retrieves a Shipping Option. + parameters: + - in: path + name: id + required: true + description: The id of the Shipping Option. + schema: + type: string + tags: + - Shipping Option + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_option: + $ref: '#/components/schemas/shipping_option' + post: + operationId: PostShippingOptionsOption + summary: Update Shipping Option + description: Updates a Shipping Option + parameters: + - in: path + name: id + required: true + description: The id of the Shipping Option. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Shipping Option + type: string + amount: + description: The amount to charge for the Shipping Option. + type: integer + requirements: + description: >- + The requirements that must be satisfied for the Shipping + Option to be available. + type: array + items: + properties: + type: + description: The type of the requirement + type: string + enum: + - max_subtotal + - min_subtotal + amount: + description: The amount to compare with. + type: integer + tags: + - Shipping Option + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_option: + $ref: '#/components/schemas/shipping_option' + '/store/currencies/{code}': + post: + operationId: PostStoreCurrenciesCode + summary: Add a Currency Code + description: Adds a Currency Code to the available currencies. + parameters: + - in: path + name: code + required: true + description: The 3 character ISO currency code. + schema: + type: string + tags: + - Store + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + store: + $ref: '#/components/schemas/store' + delete: + operationId: DeleteStoreCurrenciesCode + summary: Remvoe a Currency Code + description: Removes a Currency Code from the available currencies. + parameters: + - in: path + name: code + required: true + description: The 3 character ISO currency code. + schema: + type: string + tags: + - Store + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + store: + $ref: '#/components/schemas/store' + /store: + get: + operationId: GetStore + summary: Retrieve Store details. + description: Retrieves the Store details + tags: + - Store + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + store: + $ref: '#/components/schemas/store' + post: + operationId: PostStore + summary: Update Store details. + description: Updates the Store details + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Store + type: string + swap_link_template: + description: >- + A template for Swap links - use `{{cart_id}}` to insert the + Swap Cart id + type: string + default_currency_code: + description: The default currency code for the Store. + type: string + tags: + - Store + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + store: + $ref: '#/components/schemas/store' + /store/payment-providers: + get: + operationId: GetStorePaymentProviders + summary: Retrieve configured Payment Providers + description: Retrieves the configured Payment Providers + tags: + - Store + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + payment_providers: + type: array + items: + $ref: '#/components/schemas/store' + /shipping-profiles: + post: + operationId: PostShippingProfiles + summary: Create a Shipping Profile + description: Creates a Shipping Profile + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Shipping Profile + type: string + tags: + - Shipping Profile + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_profile: + $ref: '#/components/schemas/shipping_profile' + get: + operationId: GetShippingProfiles + summary: List Shipping Profiles + description: Retrieves a list of Shipping Profile. + tags: + - Shipping Profile + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_profiles: + type: array + items: + $ref: '#/components/schemas/shipping_profile' + '/shipping-profiles/{id}': + delete: + operationId: DeleteShippingProfilesProfile + summary: Delete a Shipping Profile + description: Deletes a Shipping Profile. + parameters: + - in: path + name: id + required: true + description: The id of the Shipping Profile. + schema: + type: string + tags: + - Shipping Profile + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + id: + type: string + description: The id of the deleted Shipping Profile. + object: + type: string + description: The type of the object that was deleted. + deleted: + type: boolean + get: + operationId: GetShippingProfilesProfile + summary: Retrieve a Shipping Profile + description: Retrieves a Shipping Profile. + parameters: + - in: path + name: id + required: true + description: The id of the Shipping Profile. + schema: + type: string + tags: + - Shipping Profile + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_profile: + $ref: '#/components/schemas/shipping_profile' + post: + operationId: PostShippingProfilesProfile + summary: Update a Shipping Profiles + description: Updates a Shipping Profile + parameters: + - in: path + name: id + required: true + description: The id of the Shipping Profile. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + name: + description: The name of the Shipping Profile + type: string + tags: + - Shipping Profile + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_profiles: + $ref: '#/components/schemas/shipping_profile' + /swaps: + get: + operationId: GetSwaps + summary: List Swaps + description: Retrieves a list of Swaps. + tags: + - Swap + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + swaps: + type: array + items: + $ref: '#/components/schemas/swap' + /variants: + get: + operationId: GetVariants + summary: List Product Variants. + description: Retrieves a list of Product Variants + tags: + - Product Variant + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + variants: + type: array + items: + $ref: '#/components/schemas/product_variant' +components: + schemas: + address: + title: Address + description: An address. + x-resourceId: address + properties: + id: + type: string + customer_id: + type: string + company: + type: string + first_name: + type: string + last_name: + type: string + address_1: + type: string + address_2: + type: string + city: + type: string + country_code: + type: string + country: + $ref: '#/components/schemas/country' + cart: + title: Cart + description: Represents a user cart + x-resourceId: cart + properties: + id: + type: string + email: + type: string + billing_address_id: + type: string + billing_address: + $ref: '#/components/schemas/address' + shipping_address_id: + type: string + shipping_address: + $ref: '#/components/schemas/address' + items: + type: array + items: + $ref: '#/components/schemas/line_item' + region_id: + type: string + region: + $ref: '#/components/schemas/region' + discounts: + type: array + items: + $ref: '#/components/schemas/region' + gift_cards: + type: array + items: + $ref: '#/components/schemas/gift_card' + customer_id: + type: string + customer: + $ref: '#/components/schemas/customer' + payment_session: + $ref: '#/components/schemas/payment_session' + payment_sessions: + type: array + items: + $ref: '#/components/schemas/payment_session' + payment: + $ref: '#/components/schemas/payment' + shipping_methods: + type: array + items: + $ref: '#/components/schemas/shipping_method' + type: + type: string + enum: + - default + - swap + - payment_link + completed_at: + type: string + format: date-time + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + shipping_total: + type: integer + discount_total: + type: integer + tax_total: + type: integer + subtotal: + type: integer + refundable_amount: + type: integer + gift_card_total: + type: integer + claim_image: + title: Claim Image + description: Represents photo documentation of a claim. + x-resourceId: claim_image + properties: + id: + type: string + claim_item_id: + type: string + url: + type: string + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + claim_item: + title: Claim Item + description: >- + Represents a claimed item along with information about the reasons for + the claim. + x-resourceId: claim_item + properties: + id: + type: string + images: + type: array + items: + $ref: '#/components/schemas/claim_image' + claim_order_id: + type: string + item_id: + type: string + item: + description: The Line Item that the claim refers to + $ref: '#/components/schemas/line_item' + variant_id: + type: string + variant: + description: The Product Variant that is claimed. + $ref: '#/components/schemas/product_variant' + reason: + description: The reason for the claim + type: string + enum: + - missing_item + - wrong_item + - production_failure + - other + note: + description: 'An optional note about the claim, for additional information' + type: string + quantity: + description: >- + The quantity of the item that is being claimed; must be less than or + equal to the amount purchased in the original order. + type: integer + tags: + description: User defined tags for easy filtering and grouping. + type: array + items: + $ref: '#/components/schemas/claim_tag' + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + claim_order: + title: Claim Order + description: >- + Claim Orders represent a group of faulty or missing items. Each claim + order consists of a subset of items associated with an original order, + and can contain additional information about fulfillments and returns. + x-resourceId: claim_order + properties: + id: + type: string + type: + type: string + enum: + - refund + - replace + payment_status: + type: string + enum: + - na + - not_refunded + - refunded + fulfillment_status: + type: string + enum: + - not_fulfilled + - partially_fulfilled + - fulfilled + - partially_shipped + - shipped + - partially_returned + - returned + - canceled + - requires_action + claim_items: + description: The items that have been claimed + type: array + items: + $ref: '#/components/schemas/claim_item' + additional_items: + description: >- + Refers to the new items to be shipped when the claim order has the + type `replace` + type: array + items: + $ref: '#/components/schemas/line_item' + order_id: + description: The id of the order that the claim comes from. + type: string + return_order: + description: Holds information about the return if the claim is to be returned + $ref: '#/components/schemas/return' + shipping_address_id: + description: The id of the address that the new items should be shipped to + type: string + shipping_address: + description: The address that the new items should be shipped to + $ref: '#/components/schemas/address' + shipping_methods: + description: The shipping methods that the claim order will be shipped with. + type: array + items: + $ref: '#/components/schemas/shipping_method' + fulfillments: + description: The fulfillments of the new items to be shipped + type: array + items: + $ref: '#/components/schemas/fulfillment' + refund_amount: + description: The amount that will be refunded in conjunction with the claim + type: integer + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + claim_tag: + title: Claim Tag + description: >- + Claim Tags are user defined tags that can be assigned to claim items for + easy filtering and grouping. + x-resourceId: claim_tag + properties: + id: + description: The id of the claim tag. Will be prefixed by `ctag_`. + type: string + value: + description: The value that the claim tag holds + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + update_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + country: + title: Country + description: Country details + x-resourceId: country + properties: + id: + description: The database id of the country + type: integer + iso_2: + description: The 2 character ISO code for the country. + type: string + iso_3: + description: The 3 character ISO code for the country. + type: string + num_code: + description: The numerical ISO code for the country. + type: string + name: + description: The normalized country name; in upper case. + type: string + display_name: + description: The country name appropriate for display. + type: string + currency: + title: Currency + description: Currency + x-resourceId: currency + properties: + code: + description: The 3 character ISO code for the currency. + type: string + symbol: + description: The symbol used to indicate the currency. + type: string + symbol_native: + description: The native symbol used to indicate the currency. + type: string + name: + description: The written name of the currency + type: string + customer: + title: Customer + description: Represents a customer + x-resourceId: customer + properties: + id: + type: string + email: + type: string + billing_address_id: + type: string + billing_address: + description: The Customer's billing address. + anyOf: + - $ref: '#/components/schemas/address' + shipping_addresses: + type: array + items: + $ref: '#/components/schemas/address' + first_name: + type: string + last_name: + type: string + phone: + type: string + has_account: + type: boolean + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + discount_rule: + title: Discount Rule + description: >- + Holds the rules that governs how a Discount is calculated when applied + to a Cart. + x-resourceId: discount_rule + properties: + id: + description: The id of the Discount Rule. Will be prefixed by `dru_`. + type: string + type: + description: >- + The type of the Discount, can be `fixed` for discounts that reduce + the price by a fixed amount, `percentage` for percentage reductions + or `free_shipping` for shipping vouchers. + type: string + enum: + - fixed + - percentage + - free_shipping + description: + description: A short description of the discount + type: string + value: + description: >- + The value that the discount represents; this will depend on the type + of the discount + type: integer + allocation: + description: The scope that the discount should apply to. + type: string + enum: + - total + - item + valid_for: + description: A set of Products that the discount can be used for. + type: array + items: + $ref: '#/components/schemas/product' + usage_limit: + description: The maximum number of times that a discount can be used. + type: integer + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + update_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + discount: + title: Discount + description: >- + Represents a discount that can be applied to a cart for promotional + purposes. + x-resourceId: discount + properties: + id: + description: The id of the Discount. Will be prefixed by `disc_`. + type: string + code: + description: >- + A unique code for the discount - this will be used by the customer + to apply the discount + type: string + is_dynamic: + description: >- + A flag to indicate if multiple instances of the discount can be + generated. I.e. for newsletter discounts + type: boolean + rule: + description: The Discount Rule that governs the behaviour of the Discount + anyOf: + - $ref: '#/components/schemas/discount_rule' + is_disabled: + description: >- + Whether the Discount has been disabled. Disabled discounts cannot be + applied to carts + type: boolean + parent_discount_id: + description: >- + The Discount that the discount was created from. This will always be + a dynamic discount + type: string + starts_at: + description: The time at which the discount can be used. + type: string + format: date-time + ends_at: + description: The time at which the discount can no longer be used. + type: string + format: date-time + regions: + description: The Regions in which the Discount can be used + type: array + items: + $ref: '#/components/schemas/region' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + fulfillment_item: + title: Fulfillment Item + description: >- + Correlates a Line Item with a Fulfillment, keeping track of the quantity + of the Line Item. + x-resourceId: fulfillment_item + properties: + fulfillment_id: + description: The id of the Fulfillment that the Fulfillment Item belongs to. + type: string + item_id: + description: The id of the Line Item that the Fulfillment Item references. + type: string + item: + description: The Line Item that the Fulfillment Item references. + anyOf: + - $ref: '#/components/schemas/line_item' + quantity: + description: The quantity of the Line Item that is included in the Fulfillment. + type: integer + fulfillment_provider: + title: Fulfillment Provider + description: >- + Represents a fulfillment provider plugin and holds its installation + status. + x-resourceId: fulfillment_provider + properties: + id: + description: The id of the fulfillment provider as given by the plugin. + type: string + is_installed: + description: >- + Whether the plugin is installed in the current version. Plugins that + are no longer installed are not deleted by will have this field set + to `false`. + type: boolean + fulfillment: + title: Fulfillment + description: >- + Fulfillments are created once store operators can prepare the purchased + goods. Fulfillments will eventually be shipped and hold information + about how to track shipments. Fulfillments are created through a + provider, which is typically an external shipping aggregator, shipping + partner og 3PL, most plugins will have asynchronous communications with + these providers through webhooks in order to automatically update and + synchronize the state of Fulfillments. + x-resourceId: fulfillment + properties: + id: + description: The id of the Fulfillment. This value will be prefixed by `ful_`. + type: string + claim_order_id: + description: The id of the Claim that the Fulfillment belongs to. + type: string + swap_id: + description: The id of the Swap that the Fulfillment belongs to. + type: string + order_id: + description: The id of the Order that the Fulfillment belongs to. + type: string + provider_id: + description: >- + The id of the Fulfillment Provider responsible for handling the + fulfillment + type: string + items: + description: >- + The Fulfillment Items in the Fulfillment - these hold information + about how many of each Line Item has been fulfilled. + type: array + items: + $ref: '#/components/schemas/fulfillment_item' + tracking_links: + description: >- + The Tracking Links that can be used to track the status of the + Fulfillment, these will usually be provided by the Fulfillment + Provider. + type: array + items: + $ref: '#/components/schemas/tracking_link' + tracking_numbers: + deprecated: true + description: >- + The tracking numbers that can be used to track the status of the + fulfillment. + type: array + items: + type: string + shipped_at: + description: The date with timezone at which the Fulfillment was shipped. + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Fulfillment was canceled. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + gift_card_transaction: + title: Gift Card Transaction + description: >- + Gift Card Transactions are created once a Customer uses a Gift Card to + pay for their Order + x-resourceId: gift_card_transaction + properties: + id: + description: >- + The id of the Gift Card Transaction. This value will be prefixed by + `gct_`. + type: string + gift_card_id: + description: The id of the Gift Card that was used in the transaction. + type: string + gift_card: + description: The Gift Card that was used in the transaction. + anyOf: + - $ref: '#/components/schemas/gift_card' + order_id: + description: The id of the Order that the Gift Card was used to pay for. + type: string + amount: + description: The amount that was used from the Gift Card. + type: integer + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + gift_card: + title: Gift Card + description: >- + Gift Cards are redeemable and represent a value that can be used towards + the payment of an Order. + x-resourceId: gift_card + properties: + id: + description: The id of the Gift Card. This value will be prefixed by `gift_`. + type: string + code: + description: >- + The unique code that identifies the Gift Card. This is used by the + Customer to redeem the value of the Gift Card. + type: string + value: + description: The value that the Gift Card represents. + type: integer + balance: + description: The remaining value on the Gift Card. + type: integer + region_id: + description: The id of the Region in which the Gift Card is available. + type: string + region: + description: The Region in which the Gift Card is available. + anyOf: + - $ref: '#/components/schemas/region' + order_id: + description: The id of the Order that the Gift Card was purchased in. + type: string + is_disabled: + description: >- + Whether the Gift Card has been disabled. Disabled Gift Cards cannot + be applied to carts. + type: boolean + ends_at: + description: The time at which the Gift Card can no longer be used. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + image: + title: Image + description: Images holds a reference to a URL at which the image file can be found. + x-resourceId: image + properties: + id: + description: The id of the Image. This value will be prefixed by `img_`. + type: string + url: + description: The URL at which the image file can be found. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + update_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + line_item: + title: Line Item + description: >- + Line Items represent purchasable units that can be added to a Cart for + checkout. When Line Items are purchased they will get copied to the + resulting 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 + properties: + id: + description: The id of the Line Item. This value will be prefixed by `item_`. + type: string + cart_id: + description: The id of the Cart that the Line Item belongs to. + type: string + order_id: + description: The id of the Order that the Line Item belongs to. + type: string + swap_id: + description: The id of the Swap that the Line Item belongs to. + type: string + claim_order_id: + description: The id of the Claim that the Line Item belongs to. + type: string + title: + description: >- + The title of the Line Item, this should be easily identifiable by + the Customer. + type: string + description: + description: A more detailed description of the contents of the Line Item. + type: string + thumbnail: + description: A URL string to a small image of the contents of the Line Item. + type: string + is_giftcard: + description: Flag to indicate if the Line Item is a Gift Card. + type: boolean + should_merge: + description: >- + Flag to indicate if new Line Items with the same variant should be + merged or added as an additional Line Item. + type: boolean + allow_discounts: + description: >- + Flag to indicate if the Line Item should be included when doing + discount calculations. + type: boolean + unit_price: + description: >- + The price of one unit of the content in the Line Item. This should + be in the currency defined by the Cart/Order/Swap/Claim that the + Line Item belongs to. + type: boolean + variant_id: + description: The id of the Product Variant contained in the Line Item. + type: string + variant: + description: The Product Variant contained in the Line Item. + anyOf: + - $ref: '#/components/schemas/product_variant' + quantity: + description: The quantity of the content in the Line Item. + type: integer + fulfilled_quantity: + description: The quantity of the Line Item that has been fulfilled. + type: integer + returned_quantity: + description: The quantity of the Line Item that has been returned. + type: integer + shipped_quantity: + description: The quantity of the Line Item that has been shipped. + type: integer + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + refundable: + description: >- + The amount that can be refunded from the given Line Item. Takes + taxes and discounts into consideration. + type: integer + money_amount: + title: Money Amount + description: >- + Money Amounts represents an amount that a given Product Variant can be + purcased for. Each Money Amount either has a Currency or Region + associated with it to indicate the pricing in a given Currency or, for + fully region-based 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 + properties: + id: + description: The id of the Money Amount. This value will be prefixed by `ma_`. + type: string + currency_code: + description: The 3 character currency code that the Money Amount is given in. + type: string + amount: + description: >- + The amount in the smallest currecny unit (e.g. cents 100 cents to + charge $1) that the Product Variant will cost. + type: integer + sale_amount: + description: >- + An optional sale amount that the Product Variant will be available + for when defined. + type: integer + variant_id: + description: The id of the Product Variant that the Money Amount belongs to. + type: string + region_id: + description: The id of the Region that the Money Amount is defined for. + type: string + region: + description: The Region that the Money Amount is defined for. + anyOf: + - $ref: '#/components/schemas/region' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + notification_provider: + title: Notification Provider + description: >- + Represents a notification provider plugin and holds its installation + status. + x-resourceId: notification_provider + properties: + id: + description: The id of the notification provider as given by the plugin. + type: string + is_installed: + description: >- + Whether the plugin is installed in the current version. Plugins that + are no longer installed are not deleted by will have this field set + to `false`. + type: boolean + notification: + title: Notification + description: >- + Notifications a communications sent via Notification Providers as a + reaction to internal events such as `order.placed`. Notifications can be + used to show a chronological timeline for communications sent to a + Customer regarding an Order, and enables resends. + x-resourceId: notification + properties: + id: + description: The id of the Notification. This value will be prefixed by `noti_`. + type: string + event_name: + description: The name of the event that the notification was sent for. + type: string + resource_type: + description: The type of resource that the Notification refers to. + type: string + resource_id: + description: The id of the resource that the Notification refers to. + type: string + customer_id: + description: The id of the Customer that the Notification was sent to. + type: string + customer: + description: The Customer that the Notification was sent to. + anyOf: + - $ref: '#/components/schemas/customer' + to: + description: >- + The address that the Notification was sent to. This will usually be + an email address, but represent other addresses such as a chat bot + user id + type: string + data: + description: >- + The data that the Notification was sent with. This contains all the + data necessary for the Notification Provider to initiate a resend. + type: object + parent_id: + description: The id of the Notification that was originally sent. + type: string + resends: + description: >- + The resends that have been completed after the original + Notification. + type: array + items: + $ref: '#/components/schemas/notification_resend' + provider_id: + description: The id of the Notification Provider that handles the Notification. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + notification_resend: + title: Notification Resend + description: A resend of a Notification. + x-resourceId: notification_resend + properties: + id: + description: The id of the Notification. This value will be prefixed by `noti_`. + type: string + event_name: + description: The name of the event that the notification was sent for. + type: string + resource_type: + description: The type of resource that the Notification refers to. + type: string + resource_id: + description: The id of the resource that the Notification refers to. + type: string + to: + description: >- + The address that the Notification was sent to. This will usually be + an email address, but represent other addresses such as a chat bot + user id + type: string + data: + description: >- + The data that the Notification was sent with. This contains all the + data necessary for the Notification Provider to initiate a resend. + type: object + parent_id: + description: The id of the Notification that was originally sent. + type: string + provider_id: + description: The id of the Notification Provider that handles the Notification. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + order: + title: Order + description: Represents an order + x-resourceId: order + properties: + id: + type: string + status: + type: string + enum: + - pending + - completed + - archived + - canceled + - requires_action + fulfillment_status: + type: string + enum: + - not_fulfilled + - partially_fulfilled + - fulfilled + - partially_shipped + - shipped + - partially_returned + - returned + - canceled + - requires_action + payment_status: + type: string + enum: + - not_paid + - awaiting + - captured + - partially_refunded + - refuneded + - canceled + - requires_action + display_id: + type: integer + cart_id: + type: string + currency_code: + type: string + tax_rate: + type: integer + discounts: + type: array + items: + $ref: '#/components/schemas/discount' + email: + type: string + billing_address_id: + type: string + billing_address: + anyOf: + - $ref: '#/components/schemas/address' + shipping_address_id: + type: string + shipping_address: + anyOf: + - $ref: '#/components/schemas/address' + items: + type: array + items: + $ref: '#/components/schemas/line_item' + region_id: + type: string + region: + anyOf: + - $ref: '#/components/schemas/region' + gift_cards: + type: array + items: + $ref: '#/components/schemas/gift_card' + customer_id: + type: string + customer: + anyOf: + - $ref: '#/components/schemas/customer' + payment_session: + anyOf: + - $ref: '#/components/schemas/payment_session' + payment_sessions: + type: array + items: + $ref: '#/components/schemas/payment_session' + payments: + type: array + items: + $ref: '#/components/schemas/payment' + shipping_methods: + type: array + items: + $ref: '#/components/schemas/shipping_method' + fulfillments: + type: array + items: + $ref: '#/components/schemas/fulfillment' + returns: + type: array + items: + $ref: '#/components/schemas/return' + claims: + type: array + items: + $ref: '#/components/schemas/claim_order' + refunds: + type: array + items: + $ref: '#/components/schemas/refund' + swaps: + type: array + items: + $ref: '#/components/schemas/refund' + gift_card_transactions: + type: array + items: + $ref: '#/components/schemas/gift_card_transaction' + canceled_at: + type: string + format: date-time + created_at: + type: string + format: date-time + update_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + shipping_total: + type: integer + discount_total: + type: integer + tax_total: + type: integer + subtotal: + type: integer + refundable_amount: + type: integer + gift_card_total: + type: integer + payment_provider: + title: Payment Provider + description: Represents a Payment Provider plugin and holds its installation status. + x-resourceId: payment_provider + properties: + id: + description: The id of the payment provider as given by the plugin. + type: string + is_installed: + description: >- + Whether the plugin is installed in the current version. Plugins that + are no longer installed are not deleted by will have this field set + to `false`. + type: boolean + payment_session: + title: Payment Session + description: >- + Payment Sessions are created when a Customer initilizes the checkout + flow, and can be used to hold the state of a payment flow. Each Payment + Session is controlled by a Payment Provider, who is responsible for the + communication with external payment services. Authorized Payment + Sessions will eventually get promoted to Payments to indicate that they + are authorized for capture/refunds/etc. + x-resourceId: payment_session + properties: + id: + description: >- + The id of the Payment Session. This value will be prefixed with + `ps_`. + type: string + cart_id: + description: The id of the Cart that the Payment Session is created for. + type: string + provider_id: + description: >- + The id of the Payment Provider that is responsible for the Payment + Session + type: string + is_selected: + description: >- + A flag to indicate if the Payment Session has been selected as the + method that will be used to complete the purchase. + type: boolean + status: + description: >- + Indicates the status of the Payment Session. Will default to + `pending`, and will eventually become `authorized`. Payment Sessions + may have the status of `requires_more` to indicate that further + actions are to be completed by the Customer. + type: string + enum: + - authorized + - pending + - requires_more + - error + - canceled + data: + description: >- + The data required for the Payment Provider to identify, modify and + process the Payment Session. Typically this will be an object that + holds an id to the external payment session, but can be an empty + object if the Payment Provider doesn't hold any state. + type: object + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + payment: + title: Payment + description: >- + Payments represent an amount authorized with a given payment method, + Payments can be captured, canceled or refunded. + x-resourceId: payment + properties: + id: + description: The id of the Payment. This value will be prefixed with `pay_`. + type: string + swap_id: + description: The id of the Swap that the Payment is used for. + type: string + order_id: + description: The id of the Order that the Payment is used for. + type: string + cart_id: + description: The id of the Cart that the Payment Session is created for. + type: string + amount: + description: The amount that the Payment has been authorized for. + type: integer + currency_code: + description: The 3 character ISO currency code that the Payment is completed in. + type: string + amount_refunded: + description: >- + The amount of the original Payment amount that has been refunded + back to the Customer. + type: integer + provider_id: + description: The id of the Payment Provider that is responsible for the Payment + type: string + data: + description: >- + The data required for the Payment Provider to identify, modify and + process the Payment. Typically this will be an object that holds an + id to the external payment session, but can be an empty object if + the Payment Provider doesn't hold any state. + type: object + captured_at: + description: The date with timezone at which the Payment was captured. + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Payment was canceled. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_collection: + title: Product Collection + description: Product Collections represents a group of Products that are related. + x-resourceId: product_collection + properties: + id: + description: >- + The id of the Product Collection. This value will be prefixed with + `pcol_`. + type: string + title: + description: The title that the Product Collection is identified by. + type: string + handle: + description: >- + A unique string that identifies the Product Collection - can for + example be used in slug structures. + type: string + products: + description: The Products contained in the Product Collection. + type: array + items: + type: object + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_option_value: + title: Product Option Value + 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 + properties: + id: + description: >- + The id of the Product Option Value. This value will be prefixed with + `optval_`. + type: string + value: + description: >- + The value that the Product Variant has defined for the specific + Product Option (e.g. if the Product Option is "Size" this value + could be "Small", "Medium" or "Large"). + type: string + option_id: + description: >- + The id of the Product Option that the Product Option Value is + defined for. + type: string + variant_id: + description: >- + The id of the Product Variant that the Product Option Value is + defined for. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_option: + title: Product Option + description: >- + Product Options define properties that may vary between different + variants of 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 + properties: + id: + description: >- + The id of the Product Option. This value will be prefixed with + `opt_`. + type: string + title: + description: The title that the Product Option is defined by (e.g. "Size"). + type: string + values: + description: The Product Option Values that are defined for the Product Option. + type: array + items: + $ref: '#/components/schemas/product_option_value' + product_id: + description: The id of the Product that the Product Option is defined for. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_tag: + title: Product Tag + description: Product Tags can be added to Products for easy filtering and grouping. + x-resourceId: product_tag + properties: + id: + description: The id of the Product Tag. This value will be prefixed with `ptag_`. + type: string + value: + description: The value that the Product Tag represents (e.g. "Pants"). + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_type: + title: Product Type + description: >- + Product Type can be added to Products for filtering and reporting + purposes. + x-resourceId: product_type + properties: + id: + description: >- + The id of the Product Type. This value will be prefixed with + `ptyp_`. + type: string + value: + description: The value that the Product Type represents (e.g. "Clothing"). + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_variant: + title: Product Variant + description: >- + Product Variants represent a Product with a specific set of Product + Option 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 + properties: + id: + description: >- + The id of the Product Variant. This value will be prefixed with + `variant_`. + type: string + title: + description: >- + A title that can be displayed for easy identification of the Product + Variant. + type: string + product_id: + description: The id of the Product that the Product Variant belongs to. + type: string + prices: + description: >- + The Money Amounts defined for the Product Variant. Each Money Amount + represents a price in a given currency or a price in a specific + Region. + type: array + items: + $ref: '#/components/schemas/money_amount' + sku: + description: >- + The unique stock keeping unit used to identify the Product Variant. + This will usually be a unqiue identifer for the item that is to be + shipped, and can be referenced across multiple systems. + type: string + barcode: + description: >- + A generic field for a GTIN number that can be used to identify the + Product Variant. + type: string + ean: + description: >- + An EAN barcode number that can be used to identify the Product + Variant. + type: string + upc: + description: >- + A UPC barcode number that can be used to identify the Product + Variant. + type: string + inventory_quantity: + description: The current quantity of the item that is stocked. + type: integer + allow_backorder: + description: >- + Whether the Product Variant should be purchasable when + `inventory_quantity` is 0. + type: boolean + manage_inventory: + description: Whether Medusa should manage inventory for the Product Variant. + type: boolean + hs_code: + description: >- + The Harmonized System code of the Product Variant. May be used by + Fulfillment Providers to pass customs information to shipping + carriers. + type: string + origin_country: + description: >- + The country in which the Product Variant was produced. May be used + by Fulfillment Providers to pass customs information to shipping + carriers. + type: string + mid_code: + description: >- + The Manufacturers Identification code that identifies the + manufacturer of the Product Variant. May be used by Fulfillment + Providers to pass customs information to shipping carriers. + type: string + material: + description: >- + The material and composition that the Product Variant is made of, + May be used by Fulfillment Providers to pass customs information to + shipping carriers. + type: string + weight: + description: >- + The weight of the Product Variant. May be used in shipping rate + calculations. + type: string + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + type: string + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + type: string + length: + description: >- + The length of the Product Variant. May be used in shipping rate + calculations. + type: string + options: + description: The Product Option Values specified for the Product Variant. + type: array + items: + $ref: '#/components/schemas/product_option_value' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product: + title: Product + description: >- + Products are a grouping of Product Variants that have common properties + such as images and descriptions. Products can have multiple options + which define the properties that Product Variants differ by. + x-resourceId: product + properties: + id: + description: The id of the Product. This value will be prefixed with `prod_`. + type: string + title: + description: >- + A title that can be displayed for easy identification of the + Product. + type: string + subtitle: + description: >- + An optional subtitle that can be used to further specify the + Product. + type: string + description: + description: A short description of the Product. + type: string + handle: + description: A unique identifier for the Product (e.g. for slug structure). + type: string + is_giftcard: + description: >- + Whether the Product represents a Gift Card. Products that represent + Gift Cards will automatically generate a redeemable Gift Card code + once they are purchased. + type: boolean + images: + description: Images of the Product + type: array + items: + $ref: '#/components/schemas/image' + thumbnail: + description: A URL to an image file that can be used to identify the Product. + type: string + options: + description: >- + The Product Options that are defined for the Product. Product + Variants of the Product will have a unique combination of Product + Option Values. + type: array + items: + $ref: '#/components/schemas/product_option' + variants: + description: >- + The Product Variants that belong to the Product. Each will have a + unique combination of Product Option Values. + type: array + items: + $ref: '#/components/schemas/product_variant' + profile_id: + description: >- + The id of the Shipping Profile that the Product belongs to. Shipping + Profiles have a set of defined Shipping Options that can be used to + Fulfill a given set of Products. + type: string + hs_code: + description: >- + The Harmonized System code of the Product Variant. May be used by + Fulfillment Providers to pass customs information to shipping + carriers. + type: string + origin_country: + description: >- + The country in which the Product Variant was produced. May be used + by Fulfillment Providers to pass customs information to shipping + carriers. + type: string + mid_code: + description: >- + The Manufacturers Identification code that identifies the + manufacturer of the Product Variant. May be used by Fulfillment + Providers to pass customs information to shipping carriers. + type: string + material: + description: >- + The material and composition that the Product Variant is made of, + May be used by Fulfillment Providers to pass customs information to + shipping carriers. + type: string + weight: + description: >- + The weight of the Product Variant. May be used in shipping rate + calculations. + type: string + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + type: string + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + type: string + length: + description: >- + The length of the Product Variant. May be used in shipping rate + calculations. + type: string + type: + description: The Product Type of the Product (e.g. "Clothing") + anyOf: + - $ref: '#/components/schemas/product_type' + collection: + description: The Product Collection that the Product belongs to (e.g. "SS20") + anyOf: + - $ref: '#/components/schemas/product_collection' + tags: + description: The Product Tags assigned to the Product. + type: array + items: + $ref: '#/components/schemas/product_tag' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + refund: + title: Refund + description: >- + Refund represent an amount of money transfered back to the Customer for + a given reason. Refunds may occur in relation to Returns, Swaps and + Claims, but can also be initiated by a store operator. + x-resourceId: refund + properties: + id: + description: The id of the Refund. This value will be prefixed with `ref_`. + type: string + order_id: + description: The id of the Order that the Refund is related to. + type: string + amount: + description: The amount that has be refunded to the Customer. + type: integer + note: + description: An optional note explaining why the amount was refunded. + type: string + reason: + description: >- + The reason given for the Refund, will automatically be set when + processed as part of a Swap, Claim or Return. + type: string + enum: + - discount + - return + - swap + - claim + - other + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + region: + title: Region + description: >- + Regions hold settings for how Customers in a given geographical location + shop. The is, for example, where currencies and tax rates are defined. A + Region can consist of multiple countries to accomodate common shopping + settings across countries. + x-resourceId: region + properties: + id: + description: The id of the Region. This value will be prefixed with `reg_`. + type: string + name: + description: >- + The name of the region as displayed to the customer. If the Region + only has one country it is recommended to write the country name. + type: string + currency_code: + description: >- + The 3 character ISO currency code that Customers will shop in in the + Region. + type: string + tax_rate: + description: The tax rate that should be charged on purchases in the Region. + type: number + tax_code: + description: >- + The tax code used on purchases in the Region. This may be used by + other systems for accounting purposes. + type: string + countries: + description: The countries that are included in the Region. + type: array + items: + $ref: '#/components/schemas/country' + payment_providers: + description: >- + The Payment Providers that can be used to process Payments in the + Region. + type: array + items: + $ref: '#/components/schemas/payment_provider' + fulfillment_providers: + description: >- + The Fulfillment Providers that can be used to fulfill orders in the + Region. + type: array + items: + $ref: '#/components/schemas/fulfillment_provider' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + return_item: + title: Return Item + 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 + properties: + return_id: + description: The id of the Return that the Return Item belongs to. + type: string + item_id: + description: The id of the Line Item that the Return Item references. + type: string + item: + description: The Line Item that the Return Item references. + anyOf: + - $ref: '#/components/schemas/line_item' + quantity: + description: The quantity of the Line Item that is included in the Return. + type: integer + is_requested: + description: >- + Whether the Return Item was requested initially or received + unexpectedly in the warehouse. + type: boolean + requested_quantity: + description: The quantity that was originally requested to be returned. + type: integer + recieved_quantity: + description: The quantity that was received in the warehouse. + type: integer + metadata: + description: An optional key-value map with additional information. + type: object + return: + title: Return + description: >- + Return orders hold information about Line Items that a Customer wishes + to send back, along with how the items will be returned. Returns can be + used as part of a Swap. + x-resourceId: return + properties: + id: + description: The id of the Return. This value will be prefixed with `ret_`. + type: string + status: + description: Status of the Return. + type: string + enum: + - requested + - received + - requires_action + items: + description: >- + The Return Items that will be shipped back to the warehouse. type: + array items: $ref: + swap_id: + description: The id of the Swap that the Return is a part of. + type: string + order_id: + description: The id of the Order that the Return is made from. + type: string + claim_order_id: + description: The id of the Claim that the Return is a part of. + type: string + shipping_method: + description: >- + The Shipping Method that will be used to send the Return back. Can + be null if the Customer facilitates the return shipment themselves. + anyOf: + - $ref: '#/components/schemas/shipping_method' + shipping_data: + description: >- + Data about the return shipment as provided by the Fulfilment + Provider that handles the return shipment. + type: object + refund_amount: + description: The amount that should be refunded as a result of the return. + type: integer + received_at: + description: The date with timezone at which the return was received. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + shipping_method: + title: Shipping Method + description: >- + Shipping Methods represent a way in which an Order or Return can be + shipped. Shipping Methods are built from a Shipping Option, but may + contain additional details, that can be necessary for the Fulfillment + Provider to handle the shipment. + x-resourceId: shipping_method + properties: + id: + description: >- + The id of the Shipping Method. This value will be prefixed with + `sm_`. + type: string + shipping_option_id: + description: >- + The id of the Shipping Option that the Shipping Method is built + from. + type: string + shipping_option: + description: The Shipping Option that the Shipping Method is built from. + anyOf: + - $ref: '#/components/schemas/shipping_option' + order_id: + description: The id of the Order that the Shipping Method is used on. + type: string + return_id: + description: The id of the Return that the Shipping Method is used on. + type: string + swap_id: + description: The id of the Swap that the Shipping Method is used on. + type: string + cart_id: + description: The id of the Cart that the Shipping Method is used on. + type: string + claim_order_id: + description: The id of the Claim that the Shipping Method is used on. + type: string + price: + description: >- + The amount to charge for the Shipping Method. The currency of the + price is defined by the Region that the Order that the Shipping + Method belongs to is a part of. + type: integer + data: + description: >- + Additional data that the Fulfillment Provider needs to fulfill the + shipment. This is used in combination with the Shipping Options + data, and may contain information such as a drop point id. + type: object + shipping_option_requirement: + title: Shipping Option Requirement + description: >- + A requirement that a Cart must satisfy for the Shipping Option to be + available to the Cart. + x-resourceId: shipping_option_requirement + properties: + id: + description: >- + The id of the Shipping Option Requirement. This value will be + prefixed with `sor_`. + type: string + shipping_option_id: + description: >- + The id of the Shipping Option that the Shipping Option Requirement + belongs to. + type: string + type: + description: >- + The type of the requirement, this defines how the value will be + compared to the Cart's total. `min_subtotal` requirements define the + minimum subtotal that is needed for the Shipping Option to be + available, while the `max_subtotal` defines the maximum subtotal + that the Cart can have for the Shipping Option to be available. + type: string + enum: + - min_subtotal + - max_subtotal + amount: + description: The amount to compare the Cart subtotal to. + type: integer + shipping_option: + title: Shipping Option + description: >- + Shipping Options represent a way in which an Order or Return can be + shipped. Shipping Options have an associated Fulfillment Provider that + will be used when the fulfillment of an Order is initiated. Shipping + Options themselves cannot be added to Carts, but serve as a template for + Shipping Methods. This distinction makes it possible to customize + individual Shipping Methods with additional information. + x-resourceId: shipping_option + properties: + id: + description: >- + The id of the Shipping Option. This value will be prefixed with + `so_`. + type: string + name: + description: >- + The name given to the Shipping Option - this may be displayed to the + Customer. + type: string + region_id: + description: The id of the Region that the Shipping Option belongs to. + type: string + region: + description: The id of the Region that the Shipping Option belongs to. + anyOf: + - $ref: '#/components/schemas/region' + profile_id: + description: >- + The id of the Shipping Profile that the Shipping Option belongs to. + Shipping Profiles have a set of defined Shipping Options that can be + used to Fulfill a given set of Products. + type: string + provider_id: + description: >- + The id of the Fulfillment Provider, that will be used to process + Fulfillments from the Shipping Option. + type: string + price_type: + description: >- + The type of pricing calculation that is used when creatin Shipping + Methods from the Shipping Option. Can be `flat_rate` for fixed + prices or `calculated` if the Fulfillment Provider can provide price + calulations. + type: string + enum: + - flat_rate + - calculated + amount: + description: >- + The amount to charge for shipping when the Shipping Option price + type is `flat_rate`. + type: integer + is_return: + description: >- + Flag to indicate if the Shipping Option can be used for Return + shipments. + type: boolean + requirements: + description: >- + The requirements that must be satisfied for the Shipping Option to + be available for a Cart. + type: array + items: + $ref: '#/components/schemas/shipping_option_requirement' + data: + description: >- + The data needed for the Fulfillment Provider to identify the + Shipping Option. + type: object + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + shipping_profile: + title: Shipping Profile + description: >- + Shipping Profiles have a set of defined Shipping Options that can be + used to fulfill a given set of Products. + x-resourceId: shipping_profile + properties: + id: + description: >- + The id of the Shipping Profile. This value will be prefixed with + `sp_`. + type: string + name: + description: >- + The name given to the Shipping profile - this may be displayed to + the Customer. + type: string + type: + description: >- + The type of the Shipping Profile, may be `default`, `gift_card` or + `custom`. + type: string + enum: + - default + - gift_card + - custom + products: + description: The Products that the Shipping Profile defines Shipping Options for. + type: array + items: + $ref: '#/components/schemas/product' + shipping_options: + description: >- + The Shipping Options that can be used to fulfill the Products in the + Shipping Profile. + type: array + items: + anyOf: + - $ref: '#/components/schemas/shipping_option' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + store: + title: Store + description: 'Holds settings for the Store, such as name, currencies, etc.' + x-resourceId: store + properties: + id: + description: The id of the Store. This value will be prefixed with `store_`. + type: string + name: + description: The name of the Store - this may be displayed to the Customer. + type: string + default_currency_code: + description: >- + The default currency code used when no other currency code is + specified. + type: string + currencies: + description: The currencies that are enabled for the Store. + type: array + items: + $ref: '#/components/schemas/currency' + swap_link_template: + description: >- + A template to generate Swap links from use {{cart_id}} to include + the Swap's `cart_id` in the link. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + swap: + title: Swap + description: >- + Swaps can be created when a Customer wishes to exchange Products that + they have purchased to different Products. Swaps consist of a Return of + previously purchased Products and a Fulfillment of new Products, the + amount paid for the Products being returned will be used towards payment + for the new Products. In the case where the amount paid for the the + Products being returned exceed the amount to be paid for the new + Products, a Refund will be issued for the difference. + x-resourceId: swap + properties: + id: + description: The id of the Swap. This value will be prefixed with `swap_`. + type: string + fulfillment_status: + description: The status of the Fulfillment of the Swap. + type: string + enum: + - not_fulfilled + - partially_fulfilled + - fulfilled + - partially_shipped + - shipped + - partially_returned + - returned + - canceled + - requires_action + payment_status: + description: >- + The status of the Payment of the Swap. The payment may either refer + to the refund of an amount or the authorization of a new amount. + type: string + enum: + - not_paid + - awaiting + - captured + - canceled + - difference_refunded + - requires_action + order_id: + description: >- + The id of the Order where the Line Items to be returned where + purchased. + type: string + additional_items: + description: The new Line Items to ship to the Customer. + type: array + items: + $ref: '#/components/schemas/line_item' + return_order: + description: The Return that is issued for the return part of the Swap. + anyOf: + - $ref: '#/components/schemas/return' + fulfillments: + description: The Fulfillments used to send the new Line Items. + type: array + items: + $ref: '#/components/schemas/fulfillment' + payment: + description: >- + The Payment authorized when the Swap requires an additional amount + to be charged from the Customer. + anyOf: + - $ref: '#/components/schemas/payment' + difference_due: + description: >- + The difference that is paid or refunded as a result of the Swap. May + be negative when the amount paid for the returned items exceed the + total of the new Products. + type: integer + shipping_address: + description: >- + The Address to send the new Line Items to - in most cases this will + be the same as the shipping address on the Order. + anyOf: + - $ref: '#/components/schemas/address' + shipping_methods: + description: The Shipping Methods used to fulfill the addtional items purchased. + type: array + items: + $ref: '#/components/schemas/shipping_method' + cart_id: + description: The id of the Cart that the Customer will use to confirm the Swap. + type: string + confirmed_at: + description: >- + The date with timezone at which the Swap was confirmed by the + Customer. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + tracking_link: + title: Tracking Link + description: >- + Tracking Link holds information about tracking numbers for a + Fulfillment. Tracking Links can optionally contain a URL that can be + visited to see the status of the shipment. + x-resourceId: tracking_link + properties: + id: + description: >- + The id of the Tracking Link. This value will be prefixed with + `tlink_`. + type: string + url: + description: The URL at which the status of the shipment can be tracked. + type: string + tracking_number: + description: The tracking number given by the shipping carrier. + type: string + fulfillment_id: + description: The id of the Fulfillment that the Tracking Link references. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + user: + title: User + description: Represents a User who can manage store settings. + x-resourceId: user + properties: + id: + description: The unique id of the User. This will be prefixed with `usr_` + type: string + email: + description: The email of the User + type: string + first_name: + type: string + last_name: + description: The Customer's billing address. + anyOf: + - $ref: '#/components/schemas/address' + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object diff --git a/docs/api/fixtures.json b/docs/api/fixtures.json new file mode 100644 index 0000000000..c7b37fa53a --- /dev/null +++ b/docs/api/fixtures.json @@ -0,0 +1,735 @@ +{ + "resources": { + "customer": { + "id": "cus_01F0BGFY6ANPB473KJ5H8V889M", + "email": "test1@email.com", + "first_name": null, + "last_name": null, + "billing_address_id": null, + "password_hash": null, + "phone": null, + "has_account": false, + "orders": [], + "created_at": "2021-03-09T12:48:21.706Z", + "updated_at": "2021-03-09T12:48:21.706Z", + "deleted_at": null, + "metadata": null + }, + "order": { + "id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT", + "status": "pending", + "fulfillment_status": "not_fulfilled", + "payment_status": "not_paid", + "display_id": 1, + "cart_id": null, + "customer_id": "cus_01F0BGFG280DRD18VXM1F9GJXA", + "customer": { + "id": "cus_01F0BGFG280DRD18VXM1F9GJXA", + "email": "test@email.com", + "first_name": null, + "last_name": null, + "billing_address_id": null, + "password_hash": null, + "phone": null, + "has_account": false, + "created_at": "2021-03-09T12:48:07.240Z", + "updated_at": "2021-03-09T12:48:07.240Z", + "deleted_at": null, + "metadata": null + }, + "email": "test@email.com", + "billing_address": { + "id": "addr_01F0BGFG30PG1NP6V0EDJDF6PW", + "customer_id": null, + "company": null, + "first_name": "lebron", + "last_name": null, + "address_1": null, + "address_2": null, + "city": null, + "country_code": null, + "province": null, + "postal_code": null, + "phone": null, + "created_at": "2021-03-09T12:48:07.263Z", + "updated_at": "2021-03-09T12:48:07.263Z", + "deleted_at": null, + "metadata": null + }, + "shipping_address": { + "id": "addr_01F0BGFG30EBKX6C89N35YB2PX", + "customer_id": null, + "company": null, + "first_name": "lebron", + "last_name": null, + "address_1": null, + "address_2": null, + "city": null, + "country_code": "us", + "province": null, + "postal_code": null, + "phone": null, + "created_at": "2021-03-09T12:48:07.263Z", + "updated_at": "2021-03-09T12:48:07.263Z", + "deleted_at": null, + "metadata": null + }, + "region_id": "reg_01F0BGFG21NC3VQ662FYNF3P4Z", + "region": { + "id": "reg_01F0BGFG21NC3VQ662FYNF3P4Z", + "name": "Test Region", + "currency_code": "usd", + "tax_rate": "0", + "tax_code": null, + "payment_providers": [], + "fulfillment_providers": [], + "created_at": "2021-03-09T12:48:07.233Z", + "updated_at": "2021-03-09T12:48:07.233Z", + "deleted_at": null, + "metadata": null + }, + "currency_code": "usd", + "tax_rate": 0, + "discounts": [ + { + "id": "test-discount", + "code": "TEST134", + "is_dynamic": false, + "rule_id": "dru_01F0BGFG30S3FSBE67PKDCTT0Y", + "rule": { + "id": "dru_01F0BGFG30S3FSBE67PKDCTT0Y", + "description": "Test Discount", + "type": "percentage", + "value": 10, + "allocation": "total", + "usage_limit": null, + "created_at": "2021-03-09T12:48:07.263Z", + "updated_at": "2021-03-09T12:48:07.263Z", + "deleted_at": null, + "metadata": null + }, + "is_disabled": false, + "parent_discount_id": null, + "starts_at": "2021-03-09T12:48:07.263Z", + "ends_at": null, + "created_at": "2021-03-09T12:48:07.263Z", + "updated_at": "2021-03-09T12:48:07.263Z", + "deleted_at": null, + "metadata": null + } + ], + "gift_cards": [], + "shipping_methods": [ + { + "id": "sm_01F0BGFG3SQZC01D8JP4REY0RF", + "shipping_option_id": "so_01F0BGFG2DV0GR6VD87AQ7XAB2", + "order_id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT", + "claim_order_id": null, + "cart_id": null, + "swap_id": null, + "return_id": null, + "shipping_option": { + "id": "so_01F0BGFG2DV0GR6VD87AQ7XAB2", + "name": "test-option", + "region_id": "reg_01F0BGFG21NC3VQ662FYNF3P4Z", + "profile_id": "sp_01F0BGFG04GKTA9FTYWBT19NKJ", + "provider_id": "test-ful", + "price_type": "flat_rate", + "amount": 1000, + "is_return": false, + "data": {}, + "created_at": "2021-03-09T12:48:07.245Z", + "updated_at": "2021-03-09T12:48:07.245Z", + "deleted_at": null, + "metadata": null + }, + "price": 1000, + "data": {} + } + ], + "payments": [ + { + "id": "test-payment", + "swap_id": null, + "cart_id": null, + "order_id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT", + "amount": 10000, + "currency_code": "usd", + "amount_refunded": 0, + "provider_id": "test", + "data": {}, + "captured_at": null, + "canceled_at": null, + "created_at": "2021-03-09T12:48:07.263Z", + "updated_at": "2021-03-09T12:48:07.263Z", + "metadata": null, + "idempotency_key": null + } + ], + "fulfillments": [], + "returns": [], + "claims": [], + "refunds": [], + "swaps": [], + "items": [ + { + "id": "test-item", + "cart_id": null, + "order_id": "order_01F0BGFG2Z0X0ETETP0YS0HRCT", + "swap_id": null, + "claim_order_id": null, + "title": "Line Item", + "description": "Line Item Desc", + "thumbnail": "https://test.js/1234", + "is_giftcard": false, + "should_merge": true, + "allow_discounts": true, + "has_shipping": null, + "unit_price": 8000, + "variant_id": null, + "variant": null, + "quantity": 1, + "fulfilled_quantity": 1, + "returned_quantity": null, + "shipped_quantity": null, + "created_at": "2021-03-09T12:48:07.263Z", + "updated_at": "2021-03-09T12:48:07.263Z", + "metadata": null, + "refundable": 7200 + } + ], + "gift_card_transactions": [], + "canceled_at": null, + "created_at": "2021-03-09T12:48:07.263Z", + "updated_at": "2021-03-09T12:48:07.263Z", + "metadata": null, + "shipping_total": 1000, + "gift_card_total": 0, + "discount_total": 800, + "tax_total": 0, + "subtotal": 8000, + "total": 8200, + "refunded_total": 0, + "refundable_amount": 8200 + }, + "product": { + "id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "title": "Test product", + "subtitle": null, + "description": "test-product-description", + "handle": "test-product", + "is_giftcard": false, + "images": [], + "thumbnail": null, + "options": [ + { + "id": "opt_01F0BGG4N2W8EZJP5KDV0W2250", + "title": "size", + "product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + { + "id": "opt_01F0BGG4N3Q09ME0BEZG6XZGFQ", + "title": "color", + "product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + } + ], + "variants": [ + { + "id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "title": "Test variant", + "product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "product": { + "id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "title": "Test product", + "subtitle": null, + "description": "test-product-description", + "handle": "test-product", + "is_giftcard": false, + "thumbnail": null, + "profile_id": "sp_01F0BGG4J2RGH25WZVP8S6VNGW", + "weight": null, + "length": null, + "height": null, + "width": null, + "hs_code": null, + "origin_country": null, + "mid_code": null, + "material": null, + "collection_id": "test-collection", + "type_id": "test-type", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + "prices": [ + { + "id": "ma_01F0BGG4P5K0TCMD72MJFS0M65", + "currency_code": "usd", + "amount": 100, + "sale_amount": null, + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "region_id": null, + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null + } + ], + "sku": null, + "barcode": null, + "ean": null, + "upc": null, + "inventory_quantity": 10, + "allow_backorder": false, + "manage_inventory": true, + "hs_code": null, + "origin_country": null, + "mid_code": null, + "material": null, + "weight": null, + "length": null, + "height": null, + "width": null, + "options": [ + { + "id": "optval_01F0BGG4NY1PRPV3FXQ3J66GQH", + "value": "large", + "option_id": "opt_01F0BGG4N2W8EZJP5KDV0W2250", + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + { + "id": "optval_01F0BGG4NYTMFH5EXJ4C7QAKSK", + "value": "green", + "option_id": "opt_01F0BGG4N3Q09ME0BEZG6XZGFQ", + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + } + ], + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + } + ], + "profile_id": "sp_01F0BGG4J2RGH25WZVP8S6VNGW", + "weight": null, + "length": null, + "height": null, + "width": null, + "hs_code": null, + "origin_country": null, + "mid_code": null, + "material": null, + "collection_id": "test-collection", + "collection": { + "id": "test-collection", + "title": "Test collection", + "handle": null, + "created_at": "2021-03-09T12:48:28.250Z", + "updated_at": "2021-03-09T12:48:28.250Z", + "deleted_at": null, + "metadata": null + }, + "type_id": "test-type", + "type": { + "id": "test-type", + "value": "test-type", + "created_at": "2021-03-09T12:48:28.260Z", + "updated_at": "2021-03-09T12:48:28.260Z", + "deleted_at": null, + "metadata": null + }, + "tags": [ + { + "id": "tag1", + "value": "123", + "created_at": "2021-03-09T12:48:28.257Z", + "updated_at": "2021-03-09T12:48:28.257Z", + "deleted_at": null, + "metadata": null + }, + { + "id": "ptag_01F0BGG4MRHZSMYN9Q1YQZHPWT", + "value": "456", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + } + ], + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "metadata": null + }, + "cart": { + "id": "cart_01F0BGFQA6ETNHS7QGEZD9VTF2", + "email": null, + "billing_address_id": null, + "billing_address": null, + "shipping_address_id": "addr_01F0BGFQA6YF81V6CREDHNCZMZ", + "shipping_address": { + "id": "addr_01F0BGFQA6YF81V6CREDHNCZMZ", + "customer_id": null, + "company": null, + "first_name": null, + "last_name": null, + "address_1": null, + "address_2": null, + "city": null, + "country_code": "us", + "province": null, + "postal_code": null, + "phone": null, + "created_at": "2021-03-09T12:48:14.638Z", + "updated_at": "2021-03-09T12:48:14.638Z", + "deleted_at": null, + "metadata": null + }, + "items": [], + "region_id": "region", + "region": { + "id": "region", + "name": "Test Region", + "currency_code": "usd", + "tax_rate": "0", + "tax_code": null, + "countries": [ + { + "id": 236, + "iso_2": "us", + "iso_3": "usa", + "num_code": 840, + "name": "UNITED STATES", + "display_name": "United States", + "region_id": "region" + } + ], + "payment_providers": [], + "fulfillment_providers": [], + "created_at": "2021-03-09T12:48:14.601Z", + "updated_at": "2021-03-09T12:48:14.601Z", + "deleted_at": null, + "metadata": null + }, + "discounts": [], + "gift_cards": [], + "customer_id": null, + "payment_sessions": [], + "payment_id": null, + "payment": null, + "shipping_methods": [], + "type": "default", + "completed_at": null, + "created_at": "2021-03-09T12:48:14.638Z", + "updated_at": "2021-03-09T12:48:14.777Z", + "deleted_at": null, + "metadata": null, + "idempotency_key": null, + "shipping_total": 0, + "discount_total": 0, + "tax_total": 0, + "gift_card_total": 0, + "subtotal": 0, + "total": 0 + }, + "product_collection": { + "id": "pcol_01F0BGG81W0FERCAHMR79J72G8", + "title": "Summer Collection", + "handle": "summer-collection", + "created_at": "2021-03-09T12:48:31.804Z", + "updated_at": "2021-03-09T12:48:31.804Z", + "deleted_at": null, + "metadata": null + }, + "discount": { + "id": "disc_01F0BGG1BJH91HJ7J9Q0NR0BR6", + "code": "10DISC", + "is_dynamic": false, + "rule_id": "dru_01F0BGG1B3BCZ292BSRRK72JGS", + "rule": { + "id": "dru_01F0BGG1B3BCZ292BSRRK72JGS", + "description": "10 Percent", + "type": "percentage", + "value": 10, + "allocation": "total", + "usage_limit": null, + "created_at": "2021-03-09T12:48:24.921Z", + "updated_at": "2021-03-09T12:48:24.921Z", + "deleted_at": null, + "metadata": null + }, + "is_disabled": false, + "parent_discount_id": null, + "starts_at": "2021-03-09T12:48:24.921Z", + "ends_at": null, + "created_at": "2021-03-09T12:48:24.921Z", + "updated_at": "2021-03-09T12:48:24.921Z", + "deleted_at": null, + "metadata": null + }, + "product_variant": { + "id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "title": "Test variant", + "product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "product": { + "id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "title": "Test product", + "subtitle": null, + "description": "test-product-description", + "handle": "test-product", + "is_giftcard": false, + "thumbnail": null, + "profile_id": "sp_01F0BGG4J2RGH25WZVP8S6VNGW", + "weight": null, + "length": null, + "height": null, + "width": null, + "hs_code": null, + "origin_country": null, + "mid_code": null, + "material": null, + "collection_id": "test-collection", + "type_id": "test-type", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + "prices": [ + { + "id": "ma_01F0BGG4P5K0TCMD72MJFS0M65", + "currency_code": "usd", + "amount": 100, + "sale_amount": null, + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "region_id": null, + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null + } + ], + "sku": null, + "barcode": null, + "ean": null, + "upc": null, + "inventory_quantity": 10, + "allow_backorder": false, + "manage_inventory": true, + "hs_code": null, + "origin_country": null, + "mid_code": null, + "material": null, + "weight": null, + "length": null, + "height": null, + "width": null, + "options": [ + { + "id": "optval_01F0BGG4NY1PRPV3FXQ3J66GQH", + "value": "large", + "option_id": "opt_01F0BGG4N2W8EZJP5KDV0W2250", + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + { + "id": "optval_01F0BGG4NYTMFH5EXJ4C7QAKSK", + "value": "green", + "option_id": "opt_01F0BGG4N3Q09ME0BEZG6XZGFQ", + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + } + ], + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + "product_option": { + "id": "opt_01F0BGG4N2W8EZJP5KDV0W2250", + "title": "size", + "product_id": "prod_01F0BGG4MWSZH7YYJGHGZMQKHM", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + "product_option_value": { + "id": "optval_01F0BGG4NY1PRPV3FXQ3J66GQH", + "value": "large", + "option_id": "opt_01F0BGG4N2W8EZJP5KDV0W2250", + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null, + "metadata": null + }, + "money_amount": { + "id": "ma_01F0BGG4P5K0TCMD72MJFS0M65", + "currency_code": "usd", + "amount": 100, + "sale_amount": null, + "variant_id": "variant_01F0BGG4NYDVW4V6AHKB58DQWT", + "region_id": null, + "created_at": "2021-03-09T12:48:28.304Z", + "updated_at": "2021-03-09T12:48:28.304Z", + "deleted_at": null + }, + "gift_card": { + "id": "gift_01F0BF6H3XHRT2SF4Y05AM95B9", + "code": "HRYB-SMX4-XXQN-2SRL", + "value": 1000, + "balance": 1000, + "region_id": "reg_01F0BF6H2MZ06R2G2ZGZCAX3NS", + "region": { + "id": "reg_01F0BF6H2MZ06R2G2ZGZCAX3NS", + "name": "Test Region", + "currency_code": "usd", + "tax_rate": "0", + "tax_code": null, + "payment_providers": [], + "fulfillment_providers": [], + "created_at": "2021-03-09T12:25:44.788Z", + "updated_at": "2021-03-09T12:25:44.788Z", + "deleted_at": null, + "metadata": null + }, + "is_disabled": false, + "ends_at": null, + "created_at": "2021-03-09T12:25:44.818Z", + "updated_at": "2021-03-09T12:25:44.818Z", + "deleted_at": null, + "metadata": null + }, + "shipping_option": { + "id": "so_01F0BGFTXZ6V3GAJHBKHNTR54H", + "name": "Free Shipping", + "region_id": "reg_01F0BGFTW7J0DGWKJJP3X7AWP9", + "region": { + "id": "reg_01F0BGFTW7J0DGWKJJP3X7AWP9", + "name": "Test Region", + "currency_code": "usd", + "tax_rate": "0", + "tax_code": null, + "payment_providers": [], + "fulfillment_providers": [ + { + "id": "test-ful", + "is_installed": true + } + ], + "created_at": "2021-03-09T12:48:18.311Z", + "updated_at": "2021-03-09T12:48:18.311Z", + "deleted_at": null, + "metadata": null + }, + "profile_id": "sp_01F0BGFTVGXRBATSDBZN5SK2JP", + "profile": { + "id": "sp_01F0BGFTVGXRBATSDBZN5SK2JP", + "name": "Default Shipping Profile", + "type": "default", + "created_at": "2021-03-09T12:48:18.240Z", + "updated_at": "2021-03-09T12:48:18.240Z", + "deleted_at": null, + "metadata": null + }, + "provider_id": "test-ful", + "price_type": "flat_rate", + "amount": 100, + "is_return": false, + "requirements": [], + "data": {}, + "created_at": "2021-03-09T12:48:18.354Z", + "updated_at": "2021-03-09T12:48:18.354Z", + "deleted_at": null, + "metadata": null + }, + "region": { + "id": "reg_01F0BGFTW7J0DGWKJJP3X7AWP9", + "name": "Test Region", + "currency_code": "usd", + "tax_rate": "0", + "tax_code": null, + "payment_providers": [], + "fulfillment_providers": [ + { + "id": "test-ful", + "is_installed": true + } + ], + "created_at": "2021-03-09T12:48:18.311Z", + "updated_at": "2021-03-09T12:48:18.311Z", + "deleted_at": null, + "metadata": null + }, + "return": { + "id": "ret_01F0BGFGGVWNV93E789K1DB2QK", + "status": "requested", + "items": [ + { + "return_id": "ret_01F0BGFGGVWNV93E789K1DB2QK", + "item_id": "test-item", + "quantity": 1, + "is_requested": true, + "requested_quantity": 1, + "received_quantity": null, + "metadata": null + } + ], + "swap_id": null, + "claim_order_id": null, + "order_id": "order_01F0BGFGBMCTXE6CD7KCTZG5D1", + "shipping_method": null, + "shipping_data": null, + "refund_amount": 7200, + "received_at": null, + "created_at": "2021-03-09T12:48:07.680Z", + "updated_at": "2021-03-09T12:48:07.680Z", + "metadata": null, + "idempotency_key": "abb55222-1d22-4852-9714-9b63baec3633" + }, + "notification": { + "id": "noti_01F0BGFKZ7P3NC5V1PG10S75N0", + "resource_type": "order", + "resource_id": "order_01F0BF66ZBXNJ98WDQ9SCWH8Y7", + "event_name": "order.placed", + "to": "test@email.com", + "provider_id": "test-not", + "created_at": "2021-03-09T12:48:11.238Z", + "updated_at": "2021-03-09T12:48:11.238Z", + "resends": [] + }, + "discount_rule": { + "id": "dru_01F0BGG1B3BCZ292BSRRK72JGS", + "description": "10 Percent", + "type": "percentage", + "value": 10, + "allocation": "total", + "usage_limit": null, + "created_at": "2021-03-09T12:48:24.921Z", + "updated_at": "2021-03-09T12:48:24.921Z", + "deleted_at": null, + "metadata": null + } + } +} \ No newline at end of file diff --git a/docs/api/store-spec3-base.json b/docs/api/store-spec3-base.json new file mode 100644 index 0000000000..1e981c55a8 --- /dev/null +++ b/docs/api/store-spec3-base.json @@ -0,0 +1,78 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Medusa Storefront API", + "license": { + "name": "MIT" + } + }, + "tags": [ + { + "name": "Auth", + "description": "Auth endpoints allows authorization of admin Users and manages their sessions." + }, + { + "name": "Cart", + "x-resourceId": "cart" + }, + { + "name": "Collection", + "x-resourceId": "product_collection" + }, + { + "name": "Customer", + "x-resourceId": "customer" + }, + { + "name": "Discount", + "x-resourceId": "discount" + }, + { + "name": "Gift Card", + "x-resourceId": "gift_card" + }, + { + "name": "Notification", + "x-resourceId": "notification" + }, + { + "name": "Order", + "x-resourceId": "order" + }, + { + "name": "Product", + "x-resourceId": "product" + }, + { + "name": "Region", + "x-resourceId": "region" + }, + { + "name": "Return", + "x-resourceId": "return" + }, + { + "name": "Shipping Option", + "x-resourceId": "shipping_option" + }, + { + "name": "Shipping Profile", + "x-resourceId": "shipping_profile" + }, + { + "name": "Swap", + "x-resourceId": "swap" + }, + { + "name": "Product Variant", + "x-resourceId": "product_variant" + } + ], + "servers": [ + { + "url": "https://api.medusa-commerce.com/store" + } + ], + "paths": {} +} diff --git a/docs/api/store-spec3.json b/docs/api/store-spec3.json new file mode 100644 index 0000000000..733bd52240 --- /dev/null +++ b/docs/api/store-spec3.json @@ -0,0 +1 @@ +{"openapi":"3.0.0","info":{"version":"1.0.0","title":"Medusa Storefront API","license":{"name":"MIT"}},"tags":[{"name":"Auth","description":"Auth endpoints allows authorization of admin Users and manages their sessions."},{"name":"Cart","x-resourceId":"cart"},{"name":"Collection","x-resourceId":"product_collection"},{"name":"Customer","x-resourceId":"customer"},{"name":"Discount","x-resourceId":"discount"},{"name":"Gift Card","x-resourceId":"gift_card"},{"name":"Notification","x-resourceId":"notification"},{"name":"Order","x-resourceId":"order"},{"name":"Product","x-resourceId":"product"},{"name":"Region","x-resourceId":"region"},{"name":"Return","x-resourceId":"return"},{"name":"Shipping Option","x-resourceId":"shipping_option"},{"name":"Shipping Profile","x-resourceId":"shipping_profile"},{"name":"Swap","x-resourceId":"swap"},{"name":"Product Variant","x-resourceId":"product_variant"}],"servers":[{"url":"https://api.medusa-commerce.com/store"}],"paths":{"/auth":{"post":{"operationId":"PostAuth","summary":"Authenticate Customer","description":"Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.","parameters":[],"tags":["Auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","description":"The Customer's email."},"password":{"type":"string","description":"The Customer's password."}}}}}}},"delete":{"operationId":"DeleteAuth","summary":"Log out","description":"Destroys a Customer's authenticated session.","tags":["Auth"],"responses":{"200":{"description":"OK"}}},"get":{"operationId":"GetAuth","summary":"Get Session","description":"Gets the currently logged in Customer.","tags":["Auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/auth/{email}":{"get":{"operationId":"GetAuthEmail","summary":"Check if email has account","description":"Checks if a Customer with the given email has signed up.","parameters":[{"in":"path","name":"email","required":true,"description":"The Customer's email.","schema":{"type":"string"}}],"tags":["Auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"exists":{"type":"boolean"}}}}}}}}},"/carts/{id}/shipping-methods":{"post":{"operationId":"PostCartsCartShippingMethod","description":"Adds a Shipping Method to the Cart.","summary":"Add a Shipping Method","tags":["Cart"],"parameters":[{"in":"path","name":"id","required":true,"description":"The cart id.","schema":{"type":"string"}}],"responses":{"200":{"description":"A successful response","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["option_id"],"properties":{"option_id":{"type":"string","description":"id of the shipping option to create the method from"},"data":{"type":"object","description":"Used to hold any data that the shipping method may need to process the fulfillment of the order. Look at the documentation for your installed fulfillment providers to find out what to send."}}}}}}}},"/carts/{id}/complete-cart":{"post":{"summary":"Complete a Cart","operationId":"PostCartsCartComplete","description":"Completes a cart. The following steps will be performed. Payment authorization is attempted and if more work is required, we simply return the cart for further updates. If payment is authorized and order is not yet created, we make sure to do so. The completion of a cart can be performed idempotently with a provided header `Idempotency-Key`. If not provided, we will generate one for the request.","parameters":[{"in":"path","name":"id","required":true,"description":"The Cart id.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"If a cart was successfully authorized, but requires further action from the user the response body will contain the cart with an updated payment session. If the Cart was successfully completed the response body will contain the newly created Order.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}},{"type":"object","properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}]}}}}}}},"/carts":{"post":{"summary":"Create a Cart","operationId":"PostCart","description":"Creates a Cart within the given region and with the initial items. If no `region_id` is provided the cart will be associated with the first Region available. If no items are provided the cart will be empty after creation. If a user is logged in the cart's customer id and email will be set.","requestBody":{"content":{"application/json":{"schema":{"properties":{"region_id":{"type":"string","description":"The id of the Region to create the Cart in."},"country_code":{"type":"string","description":"The 2 character ISO country code to create the Cart in."},"items":{"description":"An optional array of `variant_id`, `quantity` pairs to generate Line Items from.","type":"array","items":{"properties":{"variant_id":{"description":"The id of the Product Variant to generate a Line Item from.","type":"string"},"quantity":{"description":"The quantity of the Product Variant to add","type":"integer"}}}}}}}}},"tags":["Cart"],"responses":{"200":{"description":"Successfully created a new Cart","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/carts/{id}/line-items":{"post":{"operationId":"PostCartsCartLineItems","summary":"Add a Line Item","description":"Generates a Line Item with a given Product Variant and adds it to the Cart","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart to add the Line Item to.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id","quantity"],"properties":{"variant_id":{"type":"string","description":"The id of the Product Variant to generate the Line Item from."},"quantity":{"type":"integer","description":"The quantity of the Product Variant to add to the Line Item."},"metadata":{"type":"object","description":"An optional key-value map with additional details about the Line Item."}}}}}}}},"/carts/{id}/payment-sessions":{"post":{"operationId":"PostCartsCartPaymentSessions","summary":"Initialize Payment Sessions","description":"Creates Payment Sessions for each of the available Payment Providers in the Cart's Region.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/carts/{id}/discounts/{code}":{"delete":{"operationId":"DeleteCartsCartDiscountsDiscount","description":"Removes a Discount from a Cart.","summary":"Remove Discount from Cart","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}},{"in":"path","name":"code","required":true,"description":"The unique Discount code.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/carts/{id}/line-items/{line_id}":{"delete":{"operationId":"DeleteCartsCartLineItemsItem","summary":"Delete a Line Item","description":"Removes a Line Item from a Cart.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}},{"in":"path","name":"line_id","required":true,"description":"The id of the Line Item.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}},"post":{"operationId":"PostCartsCartLineItemsItem","summary":"Update a Line Item","description":"Updates a Line Item if the desired quantity can be fulfilled.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}},{"in":"path","name":"line_id","required":true,"description":"The id of the Line Item.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["quantity"],"properties":{"quantity":{"type":"integer","description":"The quantity to set the Line Item to."}}}}}}}},"/carts/{id}/payment-sessions/{provider_id}":{"delete":{"operationId":"DeleteCartsCartPaymentSessionsSession","summary":"Delete a Payment Session","description":"Deletes a Payment Session on a Cart. May be useful if a payment has failed.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}},{"in":"path","name":"provider_id","required":true,"description":"The id of the Payment Provider used to create the Payment Session to be deleted.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}},"post":{"operationId":"PostCartsCartPaymentSessionsSession","summary":"Refresh a Payment Session","description":"Refreshes a Payment Session to ensure that it is in sync with the Cart - this is usually not necessary.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}},{"in":"path","name":"provider_id","required":true,"description":"The id of the Payment Provider that created the Payment Session to be refreshed.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/carts/{id}":{"get":{"operationId":"GetCartsCart","summary":"Retrieve a Cart","description":"Retrieves a Cart.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/carts/{id}/payment-session":{"post":{"operationId":"PostCartsCartPaymentSession","summary":"Select a Payment Session","description":"Selects a Payment Session as the session intended to be used towards the completion of the Cart.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["provider_id"],"properties":{"provider_id":{"type":"string","description":"The id of the Payment Provider."}}}}}}}},"/store/carts/{id}":{"post":{"operationId":"PostCartsCart","summary":"Update a Cart\"","description":"Updates a Cart.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"region_id":{"type":"string","description":"The id of the Region to create the Cart in."},"country_code":{"type":"string","description":"The 2 character ISO country code to create the Cart in."},"email":{"type":"string","description":"An email to be used on the Cart."},"billing_address":{"description":"The Address to be used for billing purposes.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address":{"description":"The Address to be used for shipping.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"gift_cards":{"description":"An array of Gift Card codes to add to the Cart.","type":"array","items":{"properties":{"code":{"description":"The code that a Gift Card is identified by.","type":"string"}}}},"discounts":{"description":"An array of Discount codes to add to the Cart.","type":"array","items":{"properties":{"code":{"description":"The code that a Discount is identifed by.","type":"string"}}}},"customer_id":{"description":"The id of the Customer to associate the Cart with.","type":"string"}}}}}},"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/carts/{id}/payment-session/update":{"post":{"operationId":"PostCartsCartPaymentSessionUpdate","summary":"Update a Payment Session","description":"Updates a Payment Session with additional data.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}}],"tags":["Cart"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["provider_id","data"],"properties":{"provider_id":{"type":"string","description":"The id of the Payment Provider responsible for the Payment Session to update."},"data":{"type":"object","description":"The data to update the payment session with."}}}}}}}},"/customers/{id}/addresses":{"post":{"operationId":"PostCustomersCustomerAddresses","summary":"Add a Shipping Address","description":"Adds a Shipping Address to a Customer's saved addresses.","parameters":[{"in":"path","name":"id","required":true,"description":"The Customer id.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"The Address to add to the Customer.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]}}}}}},"tags":["Customer"],"responses":{"200":{"description":"A successful response","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/customers":{"post":{"operationId":"PostCustomers","summary":"Create a Customer","description":"Creates a Customer account.","parameters":[],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","first_name","last_name","password"],"properties":{"email":{"type":"string","description":"The Customer's email address."},"first_name":{"type":"string","description":"The Customer's first name."},"last_name":{"type":"string","description":"The Customer's last name."},"password":{"type":"string","description":"The Customer's password for login."},"phone":{"type":"string","description":"The Customer's phone number."}}}}}}}},"/customers/{id}/addresses/{address_id}":{"delete":{"operationId":"DeleteCustomersCustomerAddressesAddress","summary":"Delete an Address","description":"Removes an Address from the Customer's saved addresse.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}},{"in":"path","name":"address_id","required":true,"description":"The id of the Address to remove.","schema":{"type":"string"}}],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}},"post":{"operationId":"PostCustomersCustomerAddressesAddress","summary":"Update a Shipping Address","description":"Updates a Customer's saved Shipping Address.","parameters":[{"in":"path","name":"id","required":true,"description":"The Customer id.","schema":{"type":"string"}},{"in":"path","name":"address_id","required":true,"description":"The id of the Address to update.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"address":{"description":"The updated Address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]}}}}}},"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/customers/{id}":{"get":{"operationId":"GetCustomersCustomer","summary":"Retrieves a Customer","description":"Retrieves a Customer - the Customer must be logged in to retrieve their details.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}},"post":{"operationId":"PostCustomersCustomer","summary":"Update Customer details","description":"Updates a Customer's saved details.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"first_name":{"description":"The Customer's first name.","type":"string"},"last_name":{"description":"The Customer's last name.","type":"string"},"password":{"description":"The Customer's password.","type":"string"},"phone":{"description":"The Customer's phone number.","type":"string"}}}}}},"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/customers/{id}/payment-methods":{"get":{"operationId":"GetCustomersCustomerPaymentMethods","summary":"Retrieve saved payment methods","description":"Retrieves a list of a Customer's saved payment methods. Payment methods are saved with Payment Providers and it is their responsibility to fetch saved methods.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"payment_methods":{"type":"array","items":{"properties":{"provider_id":{"type":"string","description":"The id of the Payment Provider where the payment method is saved."},"data":{"type":"object","description":"The data needed for the Payment Provider to use the saved payment method."}}}}}}}}}}}},"/customers/{id}/orders":{"get":{"operationId":"GetCustomersCustomerOrders","summary":"Retrieve Customer Orders","description":"Retrieves a list of a Customer's Orders.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"payment_methods":{"type":"array","items":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}}},"/customers/{id}/password-token":{"post":{"operationId":"PostCustomersCustomerPasswordToken","summary":"Creates a reset password token","description":"Creates a reset password token to be used in a subsequent /reset-password request. The password token should be sent out of band e.g. via email and will not be returned.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"tags":["Customer"],"responses":{"204":{"description":"OK"}}}},"/customers/{id}/reset-password":{"post":{"operationId":"PostCustomersCustomerResetPassword","summary":"Resets Customer password","description":"Resets a Customer's password using a password token created by a previous /password-token request.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Customer.","schema":{"type":"string"}}],"tags":["Customer"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","token","password"],"properties":{"email":{"type":"string","description":"The Customer's email."},"token":{"type":"string","description":"The password token created by a /password-token request."},"password":{"type":"string","description":"The new password to set for the Customer."}}}}}}}},"/orders/cart/{cart_id}":{"get":{"operationId":"GetOrdersOrderCartId","summary":"Retrieves Order by Cart id","description":"Retrieves an Order by the id of the Cart that was used to create the Order.","parameters":[{"in":"path","name":"cart_id","required":true,"description":"The id of Cart.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}}}}}}}}}},"/orders/{id}":{"get":{"operationId":"GetOrdersOrder","summary":"Retrieves an Order","description":"Retrieves an Order","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Order.","schema":{"type":"string"}}],"tags":["Order"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}}}}}}},"/products/{id}":{"get":{"operationId":"GetProductsProduct","summary":"Retrieves a Product","description":"Retrieves a Product.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Product.","schema":{"type":"string"}}],"tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/products":{"get":{"operationId":"GetProducts","summary":"List Products","description":"Retrieves a list of Products.","tags":["Product"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"count":{"description":"The total number of Products.","type":"integer"},"offset":{"description":"The offset for pagination.","type":"integer"},"limit":{"description":"The maxmimum number of Products to return,","type":"integer"},"products":{"type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/regions/{id}":{"get":{"operationId":"GetRegionsRegion","summary":"Retrieves a Region","description":"Retrieves a Region.","parameters":[{"in":"path","name":"id","required":true,"description":"The id of the Region.","schema":{"type":"string"}}],"tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/regions":{"get":{"operationId":"GetRegions","summary":"List Regions","description":"Retrieves a list of Regions.","tags":["Region"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"count":{"description":"The total number of regions.","type":"integer"},"offset":{"description":"The offset for pagination.","type":"integer"},"limit":{"description":"The maxmimum number of regions to return,","type":"integer"},"regions":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/swaps/{cart_id}":{"get":{"operationId":"GetSwapsSwapCartId","summary":"Retrieve Swap by Cart id","description":"Retrieves a Swap by the id of the Cart used to confirm the Swap.","parameters":[{"in":"path","name":"cart_id","required":true,"description":"The id of the Cart","schema":{"type":"string"}}],"tags":["Swap"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"swap":{"title":"Swap","description":"Swaps can be created when a Customer wishes to exchange Products that they have purchased to different Products. Swaps consist of a Return of previously purchased Products and a Fulfillment of new Products, the amount paid for the Products being returned will be used towards payment for the new Products. In the case where the amount paid for the the Products being returned exceed the amount to be paid for the new Products, a Refund will be issued for the difference.","x-resourceId":"swap","properties":{"id":{"description":"The id of the Swap. This value will be prefixed with `swap_`.","type":"string"},"fulfillment_status":{"description":"The status of the Fulfillment of the Swap.","type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"description":"The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.","type":"string","enum":["not_paid","awaiting","captured","canceled","difference_refunded","requires_action"]},"order_id":{"description":"The id of the Order where the Line Items to be returned where purchased.","type":"string"},"additional_items":{"description":"The new Line Items to ship to the Customer.","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"return_order":{"description":"The Return that is issued for the return part of the Swap.","anyOf":[{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"fulfillments":{"description":"The Fulfillments used to send the new Line Items.","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"payment":{"description":"The Payment authorized when the Swap requires an additional amount to be charged from the Customer.","anyOf":[{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"difference_due":{"description":"The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products.","type":"integer"},"shipping_address":{"description":"The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_methods":{"description":"The Shipping Methods used to fulfill the addtional items purchased.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"cart_id":{"description":"The id of the Cart that the Customer will use to confirm the Swap.","type":"string"},"confirmed_at":{"description":"The date with timezone at which the Swap was confirmed by the Customer.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/shipping-options":{"get":{"operationId":"GetShippingOptions","summary":"Retrieve Shipping Options","description":"Retrieves a list of Shipping Options.","parameters":[{"in":"query","name":"product_ids","description":"A comma separated list of Product ids to filter Shipping Options by.","schema":{"type":"string"}},{"in":"query","name":"region_id","description":"the Region to retrieve Shipping Options from.","schema":{"type":"string"}}],"tags":["Shipping Option"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_options":{"type":"array","items":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/shipping-options/{cart_id}":{"get":{"operationId":"GetShippingOptionsCartId","summary":"Retrieve Shipping Options for Cart","description":"Retrieves a list of Shipping Options available to a cart.","parameters":[{"in":"path","name":"cart_id","required":true,"description":"The id of the Cart.","schema":{"type":"string"}}],"tags":["Shipping Option"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"shipping_options":{"type":"array","items":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}},"/variants/{variant_id}":{"get":{"operationId":"GetVariantsVariant","summary":"Retrieve a Product Variant","description":"Retrieves a Product Variant by id","parameters":[{"in":"path","name":"variant_id","required":true,"description":"The id of the Product Variant.","schema":{"type":"string"}}],"tags":["Product Variant"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}},"/variants":{"get":{"operationId":"GetVariants","summary":"Retrieve Product Variants","description":"Retrieves a list of Product Variants","parameters":[{"in":"query","name":"ids","description":"A comma separated list of Product Variant ids to filter by.","schema":{"type":"string"}}],"tags":["Product Variant"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"properties":{"variants":{"type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}}}}}}}}}}},"components":{"schemas":{"address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"cart":{"title":"Cart","description":"Represents a user cart","x-resourceId":"cart","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_address_id":{"type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discounts":{"type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"type":{"type":"string","enum":["default","swap","payment_link"]},"completed_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}},"claim_image":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"claim_item":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"claim_order":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"claim_tag":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}},"currency":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}},"customer":{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}},"discount_rule":{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"discount":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"fulfillment_item":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}},"fulfillment_provider":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}},"fulfillment":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"gift_card_transaction":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}},"gift_card":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"image":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"line_item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"money_amount":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}},"notification_provider":{"title":"Notification Provider","description":"Represents a notification provider plugin and holds its installation status.","x-resourceId":"notification_provider","properties":{"id":{"description":"The id of the notification provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}},"notification":{"title":"Notification","description":"Notifications a communications sent via Notification Providers as a reaction to internal events such as `order.placed`. Notifications can be used to show a chronological timeline for communications sent to a Customer regarding an Order, and enables resends.","x-resourceId":"notification","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"customer_id":{"description":"The id of the Customer that the Notification was sent to.","type":"string"},"customer":{"description":"The Customer that the Notification was sent to.","anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"resends":{"description":"The resends that have been completed after the original Notification.","type":"array","items":{"title":"Notification Resend","description":"A resend of a Notification.","x-resourceId":"notification_resend","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"notification_resend":{"title":"Notification Resend","description":"A resend of a Notification.","x-resourceId":"notification_resend","properties":{"id":{"description":"The id of the Notification. This value will be prefixed by `noti_`.","type":"string"},"event_name":{"description":"The name of the event that the notification was sent for.","type":"string"},"resource_type":{"description":"The type of resource that the Notification refers to.","type":"string"},"resource_id":{"description":"The id of the resource that the Notification refers to.","type":"string"},"to":{"description":"The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id","type":"string"},"data":{"description":"The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend.","type":"object"},"parent_id":{"description":"The id of the Notification that was originally sent.","type":"string"},"provider_id":{"description":"The id of the Notification Provider that handles the Notification.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"order":{"title":"Order","description":"Represents an order","x-resourceId":"order","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","completed","archived","canceled","requires_action"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"type":"string","enum":["not_paid","awaiting","captured","partially_refunded","refuneded","canceled","requires_action"]},"display_id":{"type":"integer"},"cart_id":{"type":"string"},"currency_code":{"type":"string"},"tax_rate":{"type":"integer"},"discounts":{"type":"array","items":{"title":"Discount","description":"Represents a discount that can be applied to a cart for promotional purposes.","x-resourceId":"discount","properties":{"id":{"description":"The id of the Discount. Will be prefixed by `disc_`.","type":"string"},"code":{"description":"A unique code for the discount - this will be used by the customer to apply the discount","type":"string"},"is_dynamic":{"description":"A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts","type":"boolean"},"rule":{"description":"The Discount Rule that governs the behaviour of the Discount","anyOf":[{"title":"Discount Rule","description":"Holds the rules that governs how a Discount is calculated when applied to a Cart.","x-resourceId":"discount_rule","properties":{"id":{"description":"The id of the Discount Rule. Will be prefixed by `dru_`.","type":"string"},"type":{"description":"The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers.","type":"string","enum":["fixed","percentage","free_shipping"]},"description":{"description":"A short description of the discount","type":"string"},"value":{"description":"The value that the discount represents; this will depend on the type of the discount","type":"integer"},"allocation":{"description":"The scope that the discount should apply to.","type":"string","enum":["total","item"]},"valid_for":{"description":"A set of Products that the discount can be used for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"usage_limit":{"description":"The maximum number of times that a discount can be used.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"is_disabled":{"description":"Whether the Discount has been disabled. Disabled discounts cannot be applied to carts","type":"boolean"},"parent_discount_id":{"description":"The Discount that the discount was created from. This will always be a dynamic discount","type":"string"},"starts_at":{"description":"The time at which the discount can be used.","type":"string","format":"date-time"},"ends_at":{"description":"The time at which the discount can no longer be used.","type":"string","format":"date-time"},"regions":{"description":"The Regions in which the Discount can be used","type":"array","items":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_address_id":{"type":"string"},"shipping_address":{"anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"items":{"type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"region_id":{"type":"string"},"region":{"anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"gift_cards":{"type":"array","items":{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"customer_id":{"type":"string"},"customer":{"anyOf":[{"title":"Customer","description":"Represents a customer","x-resourceId":"customer","properties":{"id":{"type":"string"},"email":{"type":"string"},"billing_address_id":{"type":"string"},"billing_address":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_addresses":{"type":"array","items":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"has_account":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}]},"payment_session":{"anyOf":[{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}]},"payment_sessions":{"type":"array","items":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}}},"payments":{"type":"array","items":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_methods":{"type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"returns":{"type":"array","items":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"claims":{"type":"array","items":{"title":"Claim Order","description":"Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns.","x-resourceId":"claim_order","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["refund","replace"]},"payment_status":{"type":"string","enum":["na","not_refunded","refunded"]},"fulfillment_status":{"type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"claim_items":{"description":"The items that have been claimed","type":"array","items":{"title":"Claim Item","description":"Represents a claimed item along with information about the reasons for the claim.","x-resourceId":"claim_item","properties":{"id":{"type":"string"},"images":{"type":"array","items":{"title":"Claim Image","description":"Represents photo documentation of a claim.","x-resourceId":"claim_image","properties":{"id":{"type":"string"},"claim_item_id":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"claim_order_id":{"type":"string"},"item_id":{"type":"string"},"item":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}},"variant_id":{"type":"string"},"variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"reason":{"description":"The reason for the claim","type":"string","enum":["missing_item","wrong_item","production_failure","other"]},"note":{"description":"An optional note about the claim, for additional information","type":"string"},"quantity":{"description":"The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order.","type":"integer"},"tags":{"description":"User defined tags for easy filtering and grouping.","type":"array","items":{"title":"Claim Tag","description":"Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.","x-resourceId":"claim_tag","properties":{"id":{"description":"The id of the claim tag. Will be prefixed by `ctag_`.","type":"string"},"value":{"description":"The value that the claim tag holds","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"additional_items":{"description":"Refers to the new items to be shipped when the claim order has the type `replace`","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"order_id":{"description":"The id of the order that the claim comes from.","type":"string"},"return_order":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_address_id":{"description":"The id of the address that the new items should be shipped to","type":"string"},"shipping_address":{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}},"shipping_methods":{"description":"The shipping methods that the claim order will be shipped with.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"fulfillments":{"description":"The fulfillments of the new items to be shipped","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"refund_amount":{"description":"The amount that will be refunded in conjunction with the claim","type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}},"refunds":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"swaps":{"type":"array","items":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"gift_card_transactions":{"type":"array","items":{"title":"Gift Card Transaction","description":"Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order","x-resourceId":"gift_card_transaction","properties":{"id":{"description":"The id of the Gift Card Transaction. This value will be prefixed by `gct_`.","type":"string"},"gift_card_id":{"description":"The id of the Gift Card that was used in the transaction.","type":"string"},"gift_card":{"description":"The Gift Card that was used in the transaction.","anyOf":[{"title":"Gift Card","description":"Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.","x-resourceId":"gift_card","properties":{"id":{"description":"The id of the Gift Card. This value will be prefixed by `gift_`.","type":"string"},"code":{"description":"The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card.","type":"string"},"value":{"description":"The value that the Gift Card represents.","type":"integer"},"balance":{"description":"The remaining value on the Gift Card.","type":"integer"},"region_id":{"description":"The id of the Region in which the Gift Card is available.","type":"string"},"region":{"description":"The Region in which the Gift Card is available.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was purchased in.","type":"string"},"is_disabled":{"description":"Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts.","type":"boolean"},"ends_at":{"description":"The time at which the Gift Card can no longer be used.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Gift Card was used to pay for.","type":"string"},"amount":{"description":"The amount that was used from the Gift Card.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"}}}},"canceled_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"update_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"shipping_total":{"type":"integer"},"discount_total":{"type":"integer"},"tax_total":{"type":"integer"},"subtotal":{"type":"integer"},"refundable_amount":{"type":"integer"},"gift_card_total":{"type":"integer"}}},"payment_provider":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}},"payment_session":{"title":"Payment Session","description":"Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc.","x-resourceId":"payment_session","properties":{"id":{"description":"The id of the Payment Session. This value will be prefixed with `ps_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment Session","type":"string"},"is_selected":{"description":"A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase.","type":"boolean"},"status":{"description":"Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer.","type":"string","enum":["authorized","pending","requires_more","error","canceled"]},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"}}},"payment":{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_collection":{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_option_value":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_option":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_tag":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_type":{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product_variant":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"product":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"refund":{"title":"Refund","description":"Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator.","x-resourceId":"refund","properties":{"id":{"description":"The id of the Refund. This value will be prefixed with `ref_`.","type":"string"},"order_id":{"description":"The id of the Order that the Refund is related to.","type":"string"},"amount":{"description":"The amount that has be refunded to the Customer.","type":"integer"},"note":{"description":"An optional note explaining why the amount was refunded.","type":"string"},"reason":{"description":"The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return.","type":"string","enum":["discount","return","swap","claim","other"]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"region":{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"return_item":{"title":"Return Item","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","properties":{"return_id":{"description":"The id of the Return that the Return Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Return Item references.","type":"string"},"item":{"description":"The Line Item that the Return Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Return.","type":"integer"},"is_requested":{"description":"Whether the Return Item was requested initially or received unexpectedly in the warehouse.","type":"boolean"},"requested_quantity":{"description":"The quantity that was originally requested to be returned.","type":"integer"},"recieved_quantity":{"description":"The quantity that was received in the warehouse.","type":"integer"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"return":{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_method":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}},"shipping_option_requirement":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}},"shipping_option":{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"shipping_profile":{"title":"Shipping Profile","description":"Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products.","x-resourceId":"shipping_profile","properties":{"id":{"description":"The id of the Shipping Profile. This value will be prefixed with `sp_`.","type":"string"},"name":{"description":"The name given to the Shipping profile - this may be displayed to the Customer.","type":"string"},"type":{"description":"The type of the Shipping Profile, may be `default`, `gift_card` or `custom`.","type":"string","enum":["default","gift_card","custom"]},"products":{"description":"The Products that the Shipping Profile defines Shipping Options for.","type":"array","items":{"title":"Product","description":"Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by.","x-resourceId":"product","properties":{"id":{"description":"The id of the Product. This value will be prefixed with `prod_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product.","type":"string"},"subtitle":{"description":"An optional subtitle that can be used to further specify the Product.","type":"string"},"description":{"description":"A short description of the Product.","type":"string"},"handle":{"description":"A unique identifier for the Product (e.g. for slug structure).","type":"string"},"is_giftcard":{"description":"Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased.","type":"boolean"},"images":{"description":"Images of the Product","type":"array","items":{"title":"Image","description":"Images holds a reference to a URL at which the image file can be found.","x-resourceId":"image","properties":{"id":{"description":"The id of the Image. This value will be prefixed by `img_`.","type":"string"},"url":{"description":"The URL at which the image file can be found.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"update_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"thumbnail":{"description":"A URL to an image file that can be used to identify the Product.","type":"string"},"options":{"description":"The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Option","description":"Product Options define properties that may vary between different variants of 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","properties":{"id":{"description":"The id of the Product Option. This value will be prefixed with `opt_`.","type":"string"},"title":{"description":"The title that the Product Option is defined by (e.g. \"Size\").","type":"string"},"values":{"description":"The Product Option Values that are defined for the Product Option.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"product_id":{"description":"The id of the Product that the Product Option is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"variants":{"description":"The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values.","type":"array","items":{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"profile_id":{"description":"The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"type":{"description":"The Product Type of the Product (e.g. \"Clothing\")","anyOf":[{"title":"Product Type","description":"Product Type can be added to Products for filtering and reporting purposes.","x-resourceId":"product_type","properties":{"id":{"description":"The id of the Product Type. This value will be prefixed with `ptyp_`.","type":"string"},"value":{"description":"The value that the Product Type represents (e.g. \"Clothing\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"collection":{"description":"The Product Collection that the Product belongs to (e.g. \"SS20\")","anyOf":[{"title":"Product Collection","description":"Product Collections represents a group of Products that are related.","x-resourceId":"product_collection","properties":{"id":{"description":"The id of the Product Collection. This value will be prefixed with `pcol_`.","type":"string"},"title":{"description":"The title that the Product Collection is identified by.","type":"string"},"handle":{"description":"A unique string that identifies the Product Collection - can for example be used in slug structures.","type":"string"},"products":{"description":"The Products contained in the Product Collection.","type":"array","items":{"type":"object"}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"tags":{"description":"The Product Tags assigned to the Product.","type":"array","items":{"title":"Product Tag","description":"Product Tags can be added to Products for easy filtering and grouping.","x-resourceId":"product_tag","properties":{"id":{"description":"The id of the Product Tag. This value will be prefixed with `ptag_`.","type":"string"},"value":{"description":"The value that the Product Tag represents (e.g. \"Pants\").","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"shipping_options":{"description":"The Shipping Options that can be used to fulfill the Products in the Shipping Profile.","type":"array","items":{"anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"store":{"title":"Store","description":"Holds settings for the Store, such as name, currencies, etc.","x-resourceId":"store","properties":{"id":{"description":"The id of the Store. This value will be prefixed with `store_`.","type":"string"},"name":{"description":"The name of the Store - this may be displayed to the Customer.","type":"string"},"default_currency_code":{"description":"The default currency code used when no other currency code is specified.","type":"string"},"currencies":{"description":"The currencies that are enabled for the Store.","type":"array","items":{"title":"Currency","description":"Currency","x-resourceId":"currency","properties":{"code":{"description":"The 3 character ISO code for the currency.","type":"string"},"symbol":{"description":"The symbol used to indicate the currency.","type":"string"},"symbol_native":{"description":"The native symbol used to indicate the currency.","type":"string"},"name":{"description":"The written name of the currency","type":"string"}}}},"swap_link_template":{"description":"A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"swap":{"title":"Swap","description":"Swaps can be created when a Customer wishes to exchange Products that they have purchased to different Products. Swaps consist of a Return of previously purchased Products and a Fulfillment of new Products, the amount paid for the Products being returned will be used towards payment for the new Products. In the case where the amount paid for the the Products being returned exceed the amount to be paid for the new Products, a Refund will be issued for the difference.","x-resourceId":"swap","properties":{"id":{"description":"The id of the Swap. This value will be prefixed with `swap_`.","type":"string"},"fulfillment_status":{"description":"The status of the Fulfillment of the Swap.","type":"string","enum":["not_fulfilled","partially_fulfilled","fulfilled","partially_shipped","shipped","partially_returned","returned","canceled","requires_action"]},"payment_status":{"description":"The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount.","type":"string","enum":["not_paid","awaiting","captured","canceled","difference_refunded","requires_action"]},"order_id":{"description":"The id of the Order where the Line Items to be returned where purchased.","type":"string"},"additional_items":{"description":"The new Line Items to ship to the Customer.","type":"array","items":{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}},"return_order":{"description":"The Return that is issued for the return part of the Swap.","anyOf":[{"title":"Return","description":"Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap.","x-resourceId":"return","properties":{"id":{"description":"The id of the Return. This value will be prefixed with `ret_`.","type":"string"},"status":{"description":"Status of the Return.","type":"string","enum":["requested","received","requires_action"]},"items":{"description":"The Return Items that will be shipped back to the warehouse. type: array items: $ref: "},"swap_id":{"description":"The id of the Swap that the Return is a part of.","type":"string"},"order_id":{"description":"The id of the Order that the Return is made from.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Return is a part of.","type":"string"},"shipping_method":{"description":"The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves.","anyOf":[{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}]},"shipping_data":{"description":"Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment.","type":"object"},"refund_amount":{"description":"The amount that should be refunded as a result of the return.","type":"integer"},"received_at":{"description":"The date with timezone at which the return was received.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"fulfillments":{"description":"The Fulfillments used to send the new Line Items.","type":"array","items":{"title":"Fulfillment","description":"Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments.","x-resourceId":"fulfillment","properties":{"id":{"description":"The id of the Fulfillment. This value will be prefixed by `ful_`.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Fulfillment belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Fulfillment belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Fulfillment belongs to.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider responsible for handling the fulfillment","type":"string"},"items":{"description":"The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled.","type":"array","items":{"title":"Fulfillment Item","description":"Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item.","x-resourceId":"fulfillment_item","properties":{"fulfillment_id":{"description":"The id of the Fulfillment that the Fulfillment Item belongs to.","type":"string"},"item_id":{"description":"The id of the Line Item that the Fulfillment Item references.","type":"string"},"item":{"description":"The Line Item that the Fulfillment Item references.","anyOf":[{"title":"Line Item","description":"Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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","properties":{"id":{"description":"The id of the Line Item. This value will be prefixed by `item_`.","type":"string"},"cart_id":{"description":"The id of the Cart that the Line Item belongs to.","type":"string"},"order_id":{"description":"The id of the Order that the Line Item belongs to.","type":"string"},"swap_id":{"description":"The id of the Swap that the Line Item belongs to.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Line Item belongs to.","type":"string"},"title":{"description":"The title of the Line Item, this should be easily identifiable by the Customer.","type":"string"},"description":{"description":"A more detailed description of the contents of the Line Item.","type":"string"},"thumbnail":{"description":"A URL string to a small image of the contents of the Line Item.","type":"string"},"is_giftcard":{"description":"Flag to indicate if the Line Item is a Gift Card.","type":"boolean"},"should_merge":{"description":"Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item.","type":"boolean"},"allow_discounts":{"description":"Flag to indicate if the Line Item should be included when doing discount calculations.","type":"boolean"},"unit_price":{"description":"The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to.","type":"boolean"},"variant_id":{"description":"The id of the Product Variant contained in the Line Item.","type":"string"},"variant":{"description":"The Product Variant contained in the Line Item.","anyOf":[{"title":"Product Variant","description":"Product Variants represent a Product with a specific set of Product Option 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","properties":{"id":{"description":"The id of the Product Variant. This value will be prefixed with `variant_`.","type":"string"},"title":{"description":"A title that can be displayed for easy identification of the Product Variant.","type":"string"},"product_id":{"description":"The id of the Product that the Product Variant belongs to.","type":"string"},"prices":{"description":"The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region.","type":"array","items":{"title":"Money Amount","description":"Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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","properties":{"id":{"description":"The id of the Money Amount. This value will be prefixed by `ma_`.","type":"string"},"currency_code":{"description":"The 3 character currency code that the Money Amount is given in.","type":"string"},"amount":{"description":"The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost.","type":"integer"},"sale_amount":{"description":"An optional sale amount that the Product Variant will be available for when defined.","type":"integer"},"variant_id":{"description":"The id of the Product Variant that the Money Amount belongs to.","type":"string"},"region_id":{"description":"The id of the Region that the Money Amount is defined for.","type":"string"},"region":{"description":"The Region that the Money Amount is defined for.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"}}}},"sku":{"description":"The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems.","type":"string"},"barcode":{"description":"A generic field for a GTIN number that can be used to identify the Product Variant.","type":"string"},"ean":{"description":"An EAN barcode number that can be used to identify the Product Variant.","type":"string"},"upc":{"description":"A UPC barcode number that can be used to identify the Product Variant.","type":"string"},"inventory_quantity":{"description":"The current quantity of the item that is stocked.","type":"integer"},"allow_backorder":{"description":"Whether the Product Variant should be purchasable when `inventory_quantity` is 0.","type":"boolean"},"manage_inventory":{"description":"Whether Medusa should manage inventory for the Product Variant.","type":"boolean"},"hs_code":{"description":"The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"origin_country":{"description":"The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"mid_code":{"description":"The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"material":{"description":"The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers.","type":"string"},"weight":{"description":"The weight of the Product Variant. May be used in shipping rate calculations.","type":"string"},"height":{"description":"The height of the Product Variant. May be used in shipping rate calculations.","type":"string"},"width":{"description":"The width of the Product Variant. May be used in shipping rate calculations.","type":"string"},"length":{"description":"The length of the Product Variant. May be used in shipping rate calculations.","type":"string"},"options":{"description":"The Product Option Values specified for the Product Variant.","type":"array","items":{"title":"Product Option Value","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","properties":{"id":{"description":"The id of the Product Option Value. This value will be prefixed with `optval_`.","type":"string"},"value":{"description":"The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\").","type":"string"},"option_id":{"description":"The id of the Product Option that the Product Option Value is defined for.","type":"string"},"variant_id":{"description":"The id of the Product Variant that the Product Option Value is defined for.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"quantity":{"description":"The quantity of the content in the Line Item.","type":"integer"},"fulfilled_quantity":{"description":"The quantity of the Line Item that has been fulfilled.","type":"integer"},"returned_quantity":{"description":"The quantity of the Line Item that has been returned.","type":"integer"},"shipped_quantity":{"description":"The quantity of the Line Item that has been shipped.","type":"integer"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"},"refundable":{"description":"The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration.","type":"integer"}}}]},"quantity":{"description":"The quantity of the Line Item that is included in the Fulfillment.","type":"integer"}}}},"tracking_links":{"description":"The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider.","type":"array","items":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"tracking_numbers":{"deprecated":true,"description":"The tracking numbers that can be used to track the status of the fulfillment.","type":"array","items":{"type":"string"}},"shipped_at":{"description":"The date with timezone at which the Fulfillment was shipped.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Fulfillment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}},"payment":{"description":"The Payment authorized when the Swap requires an additional amount to be charged from the Customer.","anyOf":[{"title":"Payment","description":"Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded.","x-resourceId":"payment","properties":{"id":{"description":"The id of the Payment. This value will be prefixed with `pay_`.","type":"string"},"swap_id":{"description":"The id of the Swap that the Payment is used for.","type":"string"},"order_id":{"description":"The id of the Order that the Payment is used for.","type":"string"},"cart_id":{"description":"The id of the Cart that the Payment Session is created for.","type":"string"},"amount":{"description":"The amount that the Payment has been authorized for.","type":"integer"},"currency_code":{"description":"The 3 character ISO currency code that the Payment is completed in.","type":"string"},"amount_refunded":{"description":"The amount of the original Payment amount that has been refunded back to the Customer.","type":"integer"},"provider_id":{"description":"The id of the Payment Provider that is responsible for the Payment","type":"string"},"data":{"description":"The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state.","type":"object"},"captured_at":{"description":"The date with timezone at which the Payment was captured.","type":"string","format":"date-time"},"canceled_at":{"description":"The date with timezone at which the Payment was canceled.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"difference_due":{"description":"The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products.","type":"integer"},"shipping_address":{"description":"The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"shipping_methods":{"description":"The Shipping Methods used to fulfill the addtional items purchased.","type":"array","items":{"title":"Shipping Method","description":"Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment.","x-resourceId":"shipping_method","properties":{"id":{"description":"The id of the Shipping Method. This value will be prefixed with `sm_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Method is built from.","type":"string"},"shipping_option":{"description":"The Shipping Option that the Shipping Method is built from.","anyOf":[{"title":"Shipping Option","description":"Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.","x-resourceId":"shipping_option","properties":{"id":{"description":"The id of the Shipping Option. This value will be prefixed with `so_`.","type":"string"},"name":{"description":"The name given to the Shipping Option - this may be displayed to the Customer.","type":"string"},"region_id":{"description":"The id of the Region that the Shipping Option belongs to.","type":"string"},"region":{"description":"The id of the Region that the Shipping Option belongs to.","anyOf":[{"title":"Region","description":"Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries.","x-resourceId":"region","properties":{"id":{"description":"The id of the Region. This value will be prefixed with `reg_`.","type":"string"},"name":{"description":"The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name.","type":"string"},"currency_code":{"description":"The 3 character ISO currency code that Customers will shop in in the Region.","type":"string"},"tax_rate":{"description":"The tax rate that should be charged on purchases in the Region.","type":"number"},"tax_code":{"description":"The tax code used on purchases in the Region. This may be used by other systems for accounting purposes.","type":"string"},"countries":{"description":"The countries that are included in the Region.","type":"array","items":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}},"payment_providers":{"description":"The Payment Providers that can be used to process Payments in the Region.","type":"array","items":{"title":"Payment Provider","description":"Represents a Payment Provider plugin and holds its installation status.","x-resourceId":"payment_provider","properties":{"id":{"description":"The id of the payment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"fulfillment_providers":{"description":"The Fulfillment Providers that can be used to fulfill orders in the Region.","type":"array","items":{"title":"Fulfillment Provider","description":"Represents a fulfillment provider plugin and holds its installation status.","x-resourceId":"fulfillment_provider","properties":{"id":{"description":"The id of the fulfillment provider as given by the plugin.","type":"string"},"is_installed":{"description":"Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`.","type":"boolean"}}}},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"profile_id":{"description":"The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products.","type":"string"},"provider_id":{"description":"The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option.","type":"string"},"price_type":{"description":"The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations.","type":"string","enum":["flat_rate","calculated"]},"amount":{"description":"The amount to charge for shipping when the Shipping Option price type is `flat_rate`.","type":"integer"},"is_return":{"description":"Flag to indicate if the Shipping Option can be used for Return shipments.","type":"boolean"},"requirements":{"description":"The requirements that must be satisfied for the Shipping Option to be available for a Cart.","type":"array","items":{"title":"Shipping Option Requirement","description":"A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart.","x-resourceId":"shipping_option_requirement","properties":{"id":{"description":"The id of the Shipping Option Requirement. This value will be prefixed with `sor_`.","type":"string"},"shipping_option_id":{"description":"The id of the Shipping Option that the Shipping Option Requirement belongs to.","type":"string"},"type":{"description":"The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available.","type":"string","enum":["min_subtotal","max_subtotal"]},"amount":{"description":"The amount to compare the Cart subtotal to.","type":"integer"}}}},"data":{"description":"The data needed for the Fulfillment Provider to identify the Shipping Option.","type":"object"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}}]},"order_id":{"description":"The id of the Order that the Shipping Method is used on.","type":"string"},"return_id":{"description":"The id of the Return that the Shipping Method is used on.","type":"string"},"swap_id":{"description":"The id of the Swap that the Shipping Method is used on.","type":"string"},"cart_id":{"description":"The id of the Cart that the Shipping Method is used on.","type":"string"},"claim_order_id":{"description":"The id of the Claim that the Shipping Method is used on.","type":"string"},"price":{"description":"The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of.","type":"integer"},"data":{"description":"Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id.","type":"object"}}}},"cart_id":{"description":"The id of the Cart that the Customer will use to confirm the Swap.","type":"string"},"confirmed_at":{"description":"The date with timezone at which the Swap was confirmed by the Customer.","type":"string","format":"date-time"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"tracking_link":{"title":"Tracking Link","description":"Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment.","x-resourceId":"tracking_link","properties":{"id":{"description":"The id of the Tracking Link. This value will be prefixed with `tlink_`.","type":"string"},"url":{"description":"The URL at which the status of the shipment can be tracked.","type":"string"},"tracking_number":{"description":"The tracking number given by the shipping carrier.","type":"string"},"fulfillment_id":{"description":"The id of the Fulfillment that the Tracking Link references.","type":"string"},"created_at":{"description":"The date with timezone at which the resource was created.","type":"string","format":"date-time"},"updated_at":{"description":"The date with timezone at which the resource was last updated.","type":"string","format":"date-time"},"deleted_at":{"description":"The date with timezone at which the resource was deleted.","type":"string","format":"date-time"},"metadata":{"description":"An optional key-value map with additional information.","type":"object"}}},"user":{"title":"User","description":"Represents a User who can manage store settings.","x-resourceId":"user","properties":{"id":{"description":"The unique id of the User. This will be prefixed with `usr_`","type":"string"},"email":{"description":"The email of the User","type":"string"},"first_name":{"type":"string"},"last_name":{"description":"The Customer's billing address.","anyOf":[{"title":"Address","description":"An address.","x-resourceId":"address","properties":{"id":{"type":"string"},"customer_id":{"type":"string"},"company":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"address_1":{"type":"string"},"address_2":{"type":"string"},"city":{"type":"string"},"country_code":{"type":"string"},"country":{"title":"Country","description":"Country details","x-resourceId":"country","properties":{"id":{"description":"The database id of the country","type":"integer"},"iso_2":{"description":"The 2 character ISO code for the country.","type":"string"},"iso_3":{"description":"The 3 character ISO code for the country.","type":"string"},"num_code":{"description":"The numerical ISO code for the country.","type":"string"},"name":{"description":"The normalized country name; in upper case.","type":"string"},"display_name":{"description":"The country name appropriate for display.","type":"string"}}}}}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"}}}}}} \ No newline at end of file diff --git a/docs/api/store-spec3.yaml b/docs/api/store-spec3.yaml new file mode 100644 index 0000000000..2c2c37a208 --- /dev/null +++ b/docs/api/store-spec3.yaml @@ -0,0 +1,3554 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: Medusa Storefront API + license: + name: MIT +tags: + - name: Auth + description: >- + Auth endpoints allows authorization of admin Users and manages their + sessions. + - name: Cart + x-resourceId: cart + - name: Collection + x-resourceId: product_collection + - name: Customer + x-resourceId: customer + - name: Discount + x-resourceId: discount + - name: Gift Card + x-resourceId: gift_card + - name: Notification + x-resourceId: notification + - name: Order + x-resourceId: order + - name: Product + x-resourceId: product + - name: Region + x-resourceId: region + - name: Return + x-resourceId: return + - name: Shipping Option + x-resourceId: shipping_option + - name: Shipping Profile + x-resourceId: shipping_profile + - name: Swap + x-resourceId: swap + - name: Product Variant + x-resourceId: product_variant +servers: + - url: 'https://api.medusa-commerce.com/store' +paths: + /auth: + post: + operationId: PostAuth + summary: Authenticate Customer + description: >- + Logs a Customer in and authorizes them to view their details. Successful + authentication will set a session cookie in the Customer's browser. + parameters: [] + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + requestBody: + content: + application/json: + schema: + type: object + required: + - email + - password + properties: + email: + type: string + description: The Customer's email. + password: + type: string + description: The Customer's password. + delete: + operationId: DeleteAuth + summary: Log out + description: Destroys a Customer's authenticated session. + tags: + - Auth + responses: + '200': + description: OK + get: + operationId: GetAuth + summary: Get Session + description: Gets the currently logged in Customer. + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '/auth/{email}': + get: + operationId: GetAuthEmail + summary: Check if email has account + description: Checks if a Customer with the given email has signed up. + parameters: + - in: path + name: email + required: true + description: The Customer's email. + schema: + type: string + tags: + - Auth + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + exists: + type: boolean + '/carts/{id}/shipping-methods': + post: + operationId: PostCartsCartShippingMethod + description: Adds a Shipping Method to the Cart. + summary: Add a Shipping Method + tags: + - Cart + parameters: + - in: path + name: id + required: true + description: The cart id. + schema: + type: string + responses: + '200': + description: A successful response + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + requestBody: + content: + application/json: + schema: + type: object + required: + - option_id + properties: + option_id: + type: string + description: id of the shipping option to create the method from + data: + type: object + description: >- + Used to hold any data that the shipping method may need to + process the fulfillment of the order. Look at the + documentation for your installed fulfillment providers to + find out what to send. + '/carts/{id}/complete-cart': + post: + summary: Complete a Cart + operationId: PostCartsCartComplete + description: >- + Completes a cart. The following steps will be performed. Payment + authorization is attempted and if more work is required, we simply + return the cart for further updates. If payment is authorized and order + is not yet created, we make sure to do so. The completion of a cart can + be performed idempotently with a provided header `Idempotency-Key`. If + not provided, we will generate one for the request. + parameters: + - in: path + name: id + required: true + description: The Cart id. + schema: + type: string + tags: + - Cart + responses: + '200': + description: >- + If a cart was successfully authorized, but requires further action + from the user the response body will contain the cart with an + updated payment session. If the Cart was successfully completed the + response body will contain the newly created Order. + content: + application/json: + schema: + oneOf: + - type: object + properties: + order: + $ref: '#/components/schemas/order' + - type: object + properties: + cart: + $ref: '#/components/schemas/cart' + /carts: + post: + summary: Create a Cart + operationId: PostCart + description: >- + Creates a Cart within the given region and with the initial items. If no + `region_id` is provided the cart will be associated with the first + Region available. If no items are provided the cart will be empty after + creation. If a user is logged in the cart's customer id and email will + be set. + requestBody: + content: + application/json: + schema: + properties: + region_id: + type: string + description: The id of the Region to create the Cart in. + country_code: + type: string + description: The 2 character ISO country code to create the Cart in. + items: + description: >- + An optional array of `variant_id`, `quantity` pairs to + generate Line Items from. + type: array + items: + properties: + variant_id: + description: >- + The id of the Product Variant to generate a Line Item + from. + type: string + quantity: + description: The quantity of the Product Variant to add + type: integer + tags: + - Cart + responses: + '200': + description: Successfully created a new Cart + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + '/carts/{id}/line-items': + post: + operationId: PostCartsCartLineItems + summary: Add a Line Item + description: >- + Generates a Line Item with a given Product Variant and adds it to the + Cart + parameters: + - in: path + name: id + required: true + description: The id of the Cart to add the Line Item to. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + requestBody: + content: + application/json: + schema: + type: object + required: + - variant_id + - quantity + properties: + variant_id: + type: string + description: >- + The id of the Product Variant to generate the Line Item + from. + quantity: + type: integer + description: The quantity of the Product Variant to add to the Line Item. + metadata: + type: object + description: >- + An optional key-value map with additional details about the + Line Item. + '/carts/{id}/payment-sessions': + post: + operationId: PostCartsCartPaymentSessions + summary: Initialize Payment Sessions + description: >- + Creates Payment Sessions for each of the available Payment Providers in + the Cart's Region. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + '/carts/{id}/discounts/{code}': + delete: + operationId: DeleteCartsCartDiscountsDiscount + description: Removes a Discount from a Cart. + summary: Remove Discount from Cart + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + - in: path + name: code + required: true + description: The unique Discount code. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + '/carts/{id}/line-items/{line_id}': + delete: + operationId: DeleteCartsCartLineItemsItem + summary: Delete a Line Item + description: Removes a Line Item from a Cart. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + - in: path + name: line_id + required: true + description: The id of the Line Item. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + post: + operationId: PostCartsCartLineItemsItem + summary: Update a Line Item + description: Updates a Line Item if the desired quantity can be fulfilled. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + - in: path + name: line_id + required: true + description: The id of the Line Item. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + requestBody: + content: + application/json: + schema: + type: object + required: + - quantity + properties: + quantity: + type: integer + description: The quantity to set the Line Item to. + '/carts/{id}/payment-sessions/{provider_id}': + delete: + operationId: DeleteCartsCartPaymentSessionsSession + summary: Delete a Payment Session + description: >- + Deletes a Payment Session on a Cart. May be useful if a payment has + failed. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + - in: path + name: provider_id + required: true + description: >- + The id of the Payment Provider used to create the Payment Session to + be deleted. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + post: + operationId: PostCartsCartPaymentSessionsSession + summary: Refresh a Payment Session + description: >- + Refreshes a Payment Session to ensure that it is in sync with the Cart - + this is usually not necessary. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + - in: path + name: provider_id + required: true + description: >- + The id of the Payment Provider that created the Payment Session to + be refreshed. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + '/carts/{id}': + get: + operationId: GetCartsCart + summary: Retrieve a Cart + description: Retrieves a Cart. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + '/carts/{id}/payment-session': + post: + operationId: PostCartsCartPaymentSession + summary: Select a Payment Session + description: >- + Selects a Payment Session as the session intended to be used towards the + completion of the Cart. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + requestBody: + content: + application/json: + schema: + type: object + required: + - provider_id + properties: + provider_id: + type: string + description: The id of the Payment Provider. + '/store/carts/{id}': + post: + operationId: PostCartsCart + summary: Update a Cart" + description: Updates a Cart. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + region_id: + type: string + description: The id of the Region to create the Cart in. + country_code: + type: string + description: The 2 character ISO country code to create the Cart in. + email: + type: string + description: An email to be used on the Cart. + billing_address: + description: The Address to be used for billing purposes. + anyOf: + - $ref: '#/components/schemas/address' + shipping_address: + description: The Address to be used for shipping. + anyOf: + - $ref: '#/components/schemas/address' + gift_cards: + description: An array of Gift Card codes to add to the Cart. + type: array + items: + properties: + code: + description: The code that a Gift Card is identified by. + type: string + discounts: + description: An array of Discount codes to add to the Cart. + type: array + items: + properties: + code: + description: The code that a Discount is identifed by. + type: string + customer_id: + description: The id of the Customer to associate the Cart with. + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + '/carts/{id}/payment-session/update': + post: + operationId: PostCartsCartPaymentSessionUpdate + summary: Update a Payment Session + description: Updates a Payment Session with additional data. + parameters: + - in: path + name: id + required: true + description: The id of the Cart. + schema: + type: string + tags: + - Cart + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + cart: + $ref: '#/components/schemas/cart' + requestBody: + content: + application/json: + schema: + type: object + required: + - provider_id + - data + properties: + provider_id: + type: string + description: >- + The id of the Payment Provider responsible for the Payment + Session to update. + data: + type: object + description: The data to update the payment session with. + '/customers/{id}/addresses': + post: + operationId: PostCustomersCustomerAddresses + summary: Add a Shipping Address + description: Adds a Shipping Address to a Customer's saved addresses. + parameters: + - in: path + name: id + required: true + description: The Customer id. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + address: + description: The Address to add to the Customer. + anyOf: + - $ref: '#/components/schemas/address' + tags: + - Customer + responses: + '200': + description: A successful response + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + /customers: + post: + operationId: PostCustomers + summary: Create a Customer + description: Creates a Customer account. + parameters: [] + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + requestBody: + content: + application/json: + schema: + type: object + required: + - email + - first_name + - last_name + - password + properties: + email: + type: string + description: The Customer's email address. + first_name: + type: string + description: The Customer's first name. + last_name: + type: string + description: The Customer's last name. + password: + type: string + description: The Customer's password for login. + phone: + type: string + description: The Customer's phone number. + '/customers/{id}/addresses/{address_id}': + delete: + operationId: DeleteCustomersCustomerAddressesAddress + summary: Delete an Address + description: Removes an Address from the Customer's saved addresse. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + - in: path + name: address_id + required: true + description: The id of the Address to remove. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + post: + operationId: PostCustomersCustomerAddressesAddress + summary: Update a Shipping Address + description: Updates a Customer's saved Shipping Address. + parameters: + - in: path + name: id + required: true + description: The Customer id. + schema: + type: string + - in: path + name: address_id + required: true + description: The id of the Address to update. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + address: + description: The updated Address. + anyOf: + - $ref: '#/components/schemas/address' + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '/customers/{id}': + get: + operationId: GetCustomersCustomer + summary: Retrieves a Customer + description: >- + Retrieves a Customer - the Customer must be logged in to retrieve their + details. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + post: + operationId: PostCustomersCustomer + summary: Update Customer details + description: Updates a Customer's saved details. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + first_name: + description: The Customer's first name. + type: string + last_name: + description: The Customer's last name. + type: string + password: + description: The Customer's password. + type: string + phone: + description: The Customer's phone number. + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '/customers/{id}/payment-methods': + get: + operationId: GetCustomersCustomerPaymentMethods + summary: Retrieve saved payment methods + description: >- + Retrieves a list of a Customer's saved payment methods. Payment methods + are saved with Payment Providers and it is their responsibility to fetch + saved methods. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + payment_methods: + type: array + items: + properties: + provider_id: + type: string + description: >- + The id of the Payment Provider where the payment + method is saved. + data: + type: object + description: >- + The data needed for the Payment Provider to use the + saved payment method. + '/customers/{id}/orders': + get: + operationId: GetCustomersCustomerOrders + summary: Retrieve Customer Orders + description: Retrieves a list of a Customer's Orders. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + payment_methods: + type: array + items: + $ref: '#/components/schemas/order' + '/customers/{id}/password-token': + post: + operationId: PostCustomersCustomerPasswordToken + summary: Creates a reset password token + description: >- + Creates a reset password token to be used in a subsequent + /reset-password request. The password token should be sent out of band + e.g. via email and will not be returned. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + tags: + - Customer + responses: + '204': + description: OK + '/customers/{id}/reset-password': + post: + operationId: PostCustomersCustomerResetPassword + summary: Resets Customer password + description: >- + Resets a Customer's password using a password token created by a + previous /password-token request. + parameters: + - in: path + name: id + required: true + description: The id of the Customer. + schema: + type: string + tags: + - Customer + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + requestBody: + content: + application/json: + schema: + type: object + required: + - email + - token + - password + properties: + email: + type: string + description: The Customer's email. + token: + type: string + description: The password token created by a /password-token request. + password: + type: string + description: The new password to set for the Customer. + '/orders/cart/{cart_id}': + get: + operationId: GetOrdersOrderCartId + summary: Retrieves Order by Cart id + description: >- + Retrieves an Order by the id of the Cart that was used to create the + Order. + parameters: + - in: path + name: cart_id + required: true + description: The id of Cart. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}': + get: + operationId: GetOrdersOrder + summary: Retrieves an Order + description: Retrieves an Order + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + '/regions/{id}': + get: + operationId: GetRegionsRegion + summary: Retrieves a Region + description: Retrieves a Region. + parameters: + - in: path + name: id + required: true + description: The id of the Region. + schema: + type: string + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + region: + $ref: '#/components/schemas/region' + /regions: + get: + operationId: GetRegions + summary: List Regions + description: Retrieves a list of Regions. + tags: + - Region + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + count: + description: The total number of regions. + type: integer + offset: + description: The offset for pagination. + type: integer + limit: + description: 'The maxmimum number of regions to return,' + type: integer + regions: + type: array + items: + $ref: '#/components/schemas/region' + /shipping-options: + get: + operationId: GetShippingOptions + summary: Retrieve Shipping Options + description: Retrieves a list of Shipping Options. + parameters: + - in: query + name: product_ids + description: A comma separated list of Product ids to filter Shipping Options by. + schema: + type: string + - in: query + name: region_id + description: the Region to retrieve Shipping Options from. + schema: + type: string + tags: + - Shipping Option + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_options: + type: array + items: + $ref: '#/components/schemas/shipping_option' + '/shipping-options/{cart_id}': + get: + operationId: GetShippingOptionsCartId + summary: Retrieve Shipping Options for Cart + description: Retrieves a list of Shipping Options available to a cart. + parameters: + - in: path + name: cart_id + required: true + description: The id of the Cart. + schema: + type: string + tags: + - Shipping Option + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + shipping_options: + type: array + items: + $ref: '#/components/schemas/shipping_option' + '/products/{id}': + get: + operationId: GetProductsProduct + summary: Retrieves a Product + description: Retrieves a Product. + parameters: + - in: path + name: id + required: true + description: The id of the Product. + schema: + type: string + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + product: + $ref: '#/components/schemas/product' + /products: + get: + operationId: GetProducts + summary: List Products + description: Retrieves a list of Products. + tags: + - Product + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + count: + description: The total number of Products. + type: integer + offset: + description: The offset for pagination. + type: integer + limit: + description: 'The maxmimum number of Products to return,' + type: integer + products: + type: array + items: + $ref: '#/components/schemas/product' + '/swaps/{cart_id}': + get: + operationId: GetSwapsSwapCartId + summary: Retrieve Swap by Cart id + description: Retrieves a Swap by the id of the Cart used to confirm the Swap. + parameters: + - in: path + name: cart_id + required: true + description: The id of the Cart + schema: + type: string + tags: + - Swap + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + swap: + $ref: '#/components/schemas/swap' + '/variants/{variant_id}': + get: + operationId: GetVariantsVariant + summary: Retrieve a Product Variant + description: Retrieves a Product Variant by id + parameters: + - in: path + name: variant_id + required: true + description: The id of the Product Variant. + schema: + type: string + tags: + - Product Variant + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + variant: + $ref: '#/components/schemas/product_variant' + /variants: + get: + operationId: GetVariants + summary: Retrieve Product Variants + description: Retrieves a list of Product Variants + parameters: + - in: query + name: ids + description: A comma separated list of Product Variant ids to filter by. + schema: + type: string + tags: + - Product Variant + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + variants: + type: array + items: + $ref: '#/components/schemas/product_variant' +components: + schemas: + address: + title: Address + description: An address. + x-resourceId: address + properties: + id: + type: string + customer_id: + type: string + company: + type: string + first_name: + type: string + last_name: + type: string + address_1: + type: string + address_2: + type: string + city: + type: string + country_code: + type: string + country: + $ref: '#/components/schemas/country' + cart: + title: Cart + description: Represents a user cart + x-resourceId: cart + properties: + id: + type: string + email: + type: string + billing_address_id: + type: string + billing_address: + $ref: '#/components/schemas/address' + shipping_address_id: + type: string + shipping_address: + $ref: '#/components/schemas/address' + items: + type: array + items: + $ref: '#/components/schemas/line_item' + region_id: + type: string + region: + $ref: '#/components/schemas/region' + discounts: + type: array + items: + $ref: '#/components/schemas/region' + gift_cards: + type: array + items: + $ref: '#/components/schemas/gift_card' + customer_id: + type: string + customer: + $ref: '#/components/schemas/customer' + payment_session: + $ref: '#/components/schemas/payment_session' + payment_sessions: + type: array + items: + $ref: '#/components/schemas/payment_session' + payment: + $ref: '#/components/schemas/payment' + shipping_methods: + type: array + items: + $ref: '#/components/schemas/shipping_method' + type: + type: string + enum: + - default + - swap + - payment_link + completed_at: + type: string + format: date-time + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + shipping_total: + type: integer + discount_total: + type: integer + tax_total: + type: integer + subtotal: + type: integer + refundable_amount: + type: integer + gift_card_total: + type: integer + claim_image: + title: Claim Image + description: Represents photo documentation of a claim. + x-resourceId: claim_image + properties: + id: + type: string + claim_item_id: + type: string + url: + type: string + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + claim_item: + title: Claim Item + description: >- + Represents a claimed item along with information about the reasons for + the claim. + x-resourceId: claim_item + properties: + id: + type: string + images: + type: array + items: + $ref: '#/components/schemas/claim_image' + claim_order_id: + type: string + item_id: + type: string + item: + description: The Line Item that the claim refers to + $ref: '#/components/schemas/line_item' + variant_id: + type: string + variant: + description: The Product Variant that is claimed. + $ref: '#/components/schemas/product_variant' + reason: + description: The reason for the claim + type: string + enum: + - missing_item + - wrong_item + - production_failure + - other + note: + description: 'An optional note about the claim, for additional information' + type: string + quantity: + description: >- + The quantity of the item that is being claimed; must be less than or + equal to the amount purchased in the original order. + type: integer + tags: + description: User defined tags for easy filtering and grouping. + type: array + items: + $ref: '#/components/schemas/claim_tag' + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + claim_order: + title: Claim Order + description: >- + Claim Orders represent a group of faulty or missing items. Each claim + order consists of a subset of items associated with an original order, + and can contain additional information about fulfillments and returns. + x-resourceId: claim_order + properties: + id: + type: string + type: + type: string + enum: + - refund + - replace + payment_status: + type: string + enum: + - na + - not_refunded + - refunded + fulfillment_status: + type: string + enum: + - not_fulfilled + - partially_fulfilled + - fulfilled + - partially_shipped + - shipped + - partially_returned + - returned + - canceled + - requires_action + claim_items: + description: The items that have been claimed + type: array + items: + $ref: '#/components/schemas/claim_item' + additional_items: + description: >- + Refers to the new items to be shipped when the claim order has the + type `replace` + type: array + items: + $ref: '#/components/schemas/line_item' + order_id: + description: The id of the order that the claim comes from. + type: string + return_order: + description: Holds information about the return if the claim is to be returned + $ref: '#/components/schemas/return' + shipping_address_id: + description: The id of the address that the new items should be shipped to + type: string + shipping_address: + description: The address that the new items should be shipped to + $ref: '#/components/schemas/address' + shipping_methods: + description: The shipping methods that the claim order will be shipped with. + type: array + items: + $ref: '#/components/schemas/shipping_method' + fulfillments: + description: The fulfillments of the new items to be shipped + type: array + items: + $ref: '#/components/schemas/fulfillment' + refund_amount: + description: The amount that will be refunded in conjunction with the claim + type: integer + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + claim_tag: + title: Claim Tag + description: >- + Claim Tags are user defined tags that can be assigned to claim items for + easy filtering and grouping. + x-resourceId: claim_tag + properties: + id: + description: The id of the claim tag. Will be prefixed by `ctag_`. + type: string + value: + description: The value that the claim tag holds + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + update_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + country: + title: Country + description: Country details + x-resourceId: country + properties: + id: + description: The database id of the country + type: integer + iso_2: + description: The 2 character ISO code for the country. + type: string + iso_3: + description: The 3 character ISO code for the country. + type: string + num_code: + description: The numerical ISO code for the country. + type: string + name: + description: The normalized country name; in upper case. + type: string + display_name: + description: The country name appropriate for display. + type: string + currency: + title: Currency + description: Currency + x-resourceId: currency + properties: + code: + description: The 3 character ISO code for the currency. + type: string + symbol: + description: The symbol used to indicate the currency. + type: string + symbol_native: + description: The native symbol used to indicate the currency. + type: string + name: + description: The written name of the currency + type: string + customer: + title: Customer + description: Represents a customer + x-resourceId: customer + properties: + id: + type: string + email: + type: string + billing_address_id: + type: string + billing_address: + description: The Customer's billing address. + anyOf: + - $ref: '#/components/schemas/address' + shipping_addresses: + type: array + items: + $ref: '#/components/schemas/address' + first_name: + type: string + last_name: + type: string + phone: + type: string + has_account: + type: boolean + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + discount_rule: + title: Discount Rule + description: >- + Holds the rules that governs how a Discount is calculated when applied + to a Cart. + x-resourceId: discount_rule + properties: + id: + description: The id of the Discount Rule. Will be prefixed by `dru_`. + type: string + type: + description: >- + The type of the Discount, can be `fixed` for discounts that reduce + the price by a fixed amount, `percentage` for percentage reductions + or `free_shipping` for shipping vouchers. + type: string + enum: + - fixed + - percentage + - free_shipping + description: + description: A short description of the discount + type: string + value: + description: >- + The value that the discount represents; this will depend on the type + of the discount + type: integer + allocation: + description: The scope that the discount should apply to. + type: string + enum: + - total + - item + valid_for: + description: A set of Products that the discount can be used for. + type: array + items: + $ref: '#/components/schemas/product' + usage_limit: + description: The maximum number of times that a discount can be used. + type: integer + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + update_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + discount: + title: Discount + description: >- + Represents a discount that can be applied to a cart for promotional + purposes. + x-resourceId: discount + properties: + id: + description: The id of the Discount. Will be prefixed by `disc_`. + type: string + code: + description: >- + A unique code for the discount - this will be used by the customer + to apply the discount + type: string + is_dynamic: + description: >- + A flag to indicate if multiple instances of the discount can be + generated. I.e. for newsletter discounts + type: boolean + rule: + description: The Discount Rule that governs the behaviour of the Discount + anyOf: + - $ref: '#/components/schemas/discount_rule' + is_disabled: + description: >- + Whether the Discount has been disabled. Disabled discounts cannot be + applied to carts + type: boolean + parent_discount_id: + description: >- + The Discount that the discount was created from. This will always be + a dynamic discount + type: string + starts_at: + description: The time at which the discount can be used. + type: string + format: date-time + ends_at: + description: The time at which the discount can no longer be used. + type: string + format: date-time + regions: + description: The Regions in which the Discount can be used + type: array + items: + $ref: '#/components/schemas/region' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + fulfillment_item: + title: Fulfillment Item + description: >- + Correlates a Line Item with a Fulfillment, keeping track of the quantity + of the Line Item. + x-resourceId: fulfillment_item + properties: + fulfillment_id: + description: The id of the Fulfillment that the Fulfillment Item belongs to. + type: string + item_id: + description: The id of the Line Item that the Fulfillment Item references. + type: string + item: + description: The Line Item that the Fulfillment Item references. + anyOf: + - $ref: '#/components/schemas/line_item' + quantity: + description: The quantity of the Line Item that is included in the Fulfillment. + type: integer + fulfillment_provider: + title: Fulfillment Provider + description: >- + Represents a fulfillment provider plugin and holds its installation + status. + x-resourceId: fulfillment_provider + properties: + id: + description: The id of the fulfillment provider as given by the plugin. + type: string + is_installed: + description: >- + Whether the plugin is installed in the current version. Plugins that + are no longer installed are not deleted by will have this field set + to `false`. + type: boolean + fulfillment: + title: Fulfillment + description: >- + Fulfillments are created once store operators can prepare the purchased + goods. Fulfillments will eventually be shipped and hold information + about how to track shipments. Fulfillments are created through a + provider, which is typically an external shipping aggregator, shipping + partner og 3PL, most plugins will have asynchronous communications with + these providers through webhooks in order to automatically update and + synchronize the state of Fulfillments. + x-resourceId: fulfillment + properties: + id: + description: The id of the Fulfillment. This value will be prefixed by `ful_`. + type: string + claim_order_id: + description: The id of the Claim that the Fulfillment belongs to. + type: string + swap_id: + description: The id of the Swap that the Fulfillment belongs to. + type: string + order_id: + description: The id of the Order that the Fulfillment belongs to. + type: string + provider_id: + description: >- + The id of the Fulfillment Provider responsible for handling the + fulfillment + type: string + items: + description: >- + The Fulfillment Items in the Fulfillment - these hold information + about how many of each Line Item has been fulfilled. + type: array + items: + $ref: '#/components/schemas/fulfillment_item' + tracking_links: + description: >- + The Tracking Links that can be used to track the status of the + Fulfillment, these will usually be provided by the Fulfillment + Provider. + type: array + items: + $ref: '#/components/schemas/tracking_link' + tracking_numbers: + deprecated: true + description: >- + The tracking numbers that can be used to track the status of the + fulfillment. + type: array + items: + type: string + shipped_at: + description: The date with timezone at which the Fulfillment was shipped. + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Fulfillment was canceled. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + gift_card_transaction: + title: Gift Card Transaction + description: >- + Gift Card Transactions are created once a Customer uses a Gift Card to + pay for their Order + x-resourceId: gift_card_transaction + properties: + id: + description: >- + The id of the Gift Card Transaction. This value will be prefixed by + `gct_`. + type: string + gift_card_id: + description: The id of the Gift Card that was used in the transaction. + type: string + gift_card: + description: The Gift Card that was used in the transaction. + anyOf: + - $ref: '#/components/schemas/gift_card' + order_id: + description: The id of the Order that the Gift Card was used to pay for. + type: string + amount: + description: The amount that was used from the Gift Card. + type: integer + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + gift_card: + title: Gift Card + description: >- + Gift Cards are redeemable and represent a value that can be used towards + the payment of an Order. + x-resourceId: gift_card + properties: + id: + description: The id of the Gift Card. This value will be prefixed by `gift_`. + type: string + code: + description: >- + The unique code that identifies the Gift Card. This is used by the + Customer to redeem the value of the Gift Card. + type: string + value: + description: The value that the Gift Card represents. + type: integer + balance: + description: The remaining value on the Gift Card. + type: integer + region_id: + description: The id of the Region in which the Gift Card is available. + type: string + region: + description: The Region in which the Gift Card is available. + anyOf: + - $ref: '#/components/schemas/region' + order_id: + description: The id of the Order that the Gift Card was purchased in. + type: string + is_disabled: + description: >- + Whether the Gift Card has been disabled. Disabled Gift Cards cannot + be applied to carts. + type: boolean + ends_at: + description: The time at which the Gift Card can no longer be used. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + image: + title: Image + description: Images holds a reference to a URL at which the image file can be found. + x-resourceId: image + properties: + id: + description: The id of the Image. This value will be prefixed by `img_`. + type: string + url: + description: The URL at which the image file can be found. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + update_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + line_item: + title: Line Item + description: >- + Line Items represent purchasable units that can be added to a Cart for + checkout. When Line Items are purchased they will get copied to the + resulting 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 + properties: + id: + description: The id of the Line Item. This value will be prefixed by `item_`. + type: string + cart_id: + description: The id of the Cart that the Line Item belongs to. + type: string + order_id: + description: The id of the Order that the Line Item belongs to. + type: string + swap_id: + description: The id of the Swap that the Line Item belongs to. + type: string + claim_order_id: + description: The id of the Claim that the Line Item belongs to. + type: string + title: + description: >- + The title of the Line Item, this should be easily identifiable by + the Customer. + type: string + description: + description: A more detailed description of the contents of the Line Item. + type: string + thumbnail: + description: A URL string to a small image of the contents of the Line Item. + type: string + is_giftcard: + description: Flag to indicate if the Line Item is a Gift Card. + type: boolean + should_merge: + description: >- + Flag to indicate if new Line Items with the same variant should be + merged or added as an additional Line Item. + type: boolean + allow_discounts: + description: >- + Flag to indicate if the Line Item should be included when doing + discount calculations. + type: boolean + unit_price: + description: >- + The price of one unit of the content in the Line Item. This should + be in the currency defined by the Cart/Order/Swap/Claim that the + Line Item belongs to. + type: boolean + variant_id: + description: The id of the Product Variant contained in the Line Item. + type: string + variant: + description: The Product Variant contained in the Line Item. + anyOf: + - $ref: '#/components/schemas/product_variant' + quantity: + description: The quantity of the content in the Line Item. + type: integer + fulfilled_quantity: + description: The quantity of the Line Item that has been fulfilled. + type: integer + returned_quantity: + description: The quantity of the Line Item that has been returned. + type: integer + shipped_quantity: + description: The quantity of the Line Item that has been shipped. + type: integer + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + refundable: + description: >- + The amount that can be refunded from the given Line Item. Takes + taxes and discounts into consideration. + type: integer + money_amount: + title: Money Amount + description: >- + Money Amounts represents an amount that a given Product Variant can be + purcased for. Each Money Amount either has a Currency or Region + associated with it to indicate the pricing in a given Currency or, for + fully region-based 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 + properties: + id: + description: The id of the Money Amount. This value will be prefixed by `ma_`. + type: string + currency_code: + description: The 3 character currency code that the Money Amount is given in. + type: string + amount: + description: >- + The amount in the smallest currecny unit (e.g. cents 100 cents to + charge $1) that the Product Variant will cost. + type: integer + sale_amount: + description: >- + An optional sale amount that the Product Variant will be available + for when defined. + type: integer + variant_id: + description: The id of the Product Variant that the Money Amount belongs to. + type: string + region_id: + description: The id of the Region that the Money Amount is defined for. + type: string + region: + description: The Region that the Money Amount is defined for. + anyOf: + - $ref: '#/components/schemas/region' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + notification_provider: + title: Notification Provider + description: >- + Represents a notification provider plugin and holds its installation + status. + x-resourceId: notification_provider + properties: + id: + description: The id of the notification provider as given by the plugin. + type: string + is_installed: + description: >- + Whether the plugin is installed in the current version. Plugins that + are no longer installed are not deleted by will have this field set + to `false`. + type: boolean + notification: + title: Notification + description: >- + Notifications a communications sent via Notification Providers as a + reaction to internal events such as `order.placed`. Notifications can be + used to show a chronological timeline for communications sent to a + Customer regarding an Order, and enables resends. + x-resourceId: notification + properties: + id: + description: The id of the Notification. This value will be prefixed by `noti_`. + type: string + event_name: + description: The name of the event that the notification was sent for. + type: string + resource_type: + description: The type of resource that the Notification refers to. + type: string + resource_id: + description: The id of the resource that the Notification refers to. + type: string + customer_id: + description: The id of the Customer that the Notification was sent to. + type: string + customer: + description: The Customer that the Notification was sent to. + anyOf: + - $ref: '#/components/schemas/customer' + to: + description: >- + The address that the Notification was sent to. This will usually be + an email address, but represent other addresses such as a chat bot + user id + type: string + data: + description: >- + The data that the Notification was sent with. This contains all the + data necessary for the Notification Provider to initiate a resend. + type: object + parent_id: + description: The id of the Notification that was originally sent. + type: string + resends: + description: >- + The resends that have been completed after the original + Notification. + type: array + items: + $ref: '#/components/schemas/notification_resend' + provider_id: + description: The id of the Notification Provider that handles the Notification. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + notification_resend: + title: Notification Resend + description: A resend of a Notification. + x-resourceId: notification_resend + properties: + id: + description: The id of the Notification. This value will be prefixed by `noti_`. + type: string + event_name: + description: The name of the event that the notification was sent for. + type: string + resource_type: + description: The type of resource that the Notification refers to. + type: string + resource_id: + description: The id of the resource that the Notification refers to. + type: string + to: + description: >- + The address that the Notification was sent to. This will usually be + an email address, but represent other addresses such as a chat bot + user id + type: string + data: + description: >- + The data that the Notification was sent with. This contains all the + data necessary for the Notification Provider to initiate a resend. + type: object + parent_id: + description: The id of the Notification that was originally sent. + type: string + provider_id: + description: The id of the Notification Provider that handles the Notification. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + order: + title: Order + description: Represents an order + x-resourceId: order + properties: + id: + type: string + status: + type: string + enum: + - pending + - completed + - archived + - canceled + - requires_action + fulfillment_status: + type: string + enum: + - not_fulfilled + - partially_fulfilled + - fulfilled + - partially_shipped + - shipped + - partially_returned + - returned + - canceled + - requires_action + payment_status: + type: string + enum: + - not_paid + - awaiting + - captured + - partially_refunded + - refuneded + - canceled + - requires_action + display_id: + type: integer + cart_id: + type: string + currency_code: + type: string + tax_rate: + type: integer + discounts: + type: array + items: + $ref: '#/components/schemas/discount' + email: + type: string + billing_address_id: + type: string + billing_address: + anyOf: + - $ref: '#/components/schemas/address' + shipping_address_id: + type: string + shipping_address: + anyOf: + - $ref: '#/components/schemas/address' + items: + type: array + items: + $ref: '#/components/schemas/line_item' + region_id: + type: string + region: + anyOf: + - $ref: '#/components/schemas/region' + gift_cards: + type: array + items: + $ref: '#/components/schemas/gift_card' + customer_id: + type: string + customer: + anyOf: + - $ref: '#/components/schemas/customer' + payment_session: + anyOf: + - $ref: '#/components/schemas/payment_session' + payment_sessions: + type: array + items: + $ref: '#/components/schemas/payment_session' + payments: + type: array + items: + $ref: '#/components/schemas/payment' + shipping_methods: + type: array + items: + $ref: '#/components/schemas/shipping_method' + fulfillments: + type: array + items: + $ref: '#/components/schemas/fulfillment' + returns: + type: array + items: + $ref: '#/components/schemas/return' + claims: + type: array + items: + $ref: '#/components/schemas/claim_order' + refunds: + type: array + items: + $ref: '#/components/schemas/refund' + swaps: + type: array + items: + $ref: '#/components/schemas/refund' + gift_card_transactions: + type: array + items: + $ref: '#/components/schemas/gift_card_transaction' + canceled_at: + type: string + format: date-time + created_at: + type: string + format: date-time + update_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object + shipping_total: + type: integer + discount_total: + type: integer + tax_total: + type: integer + subtotal: + type: integer + refundable_amount: + type: integer + gift_card_total: + type: integer + payment_provider: + title: Payment Provider + description: Represents a Payment Provider plugin and holds its installation status. + x-resourceId: payment_provider + properties: + id: + description: The id of the payment provider as given by the plugin. + type: string + is_installed: + description: >- + Whether the plugin is installed in the current version. Plugins that + are no longer installed are not deleted by will have this field set + to `false`. + type: boolean + payment_session: + title: Payment Session + description: >- + Payment Sessions are created when a Customer initilizes the checkout + flow, and can be used to hold the state of a payment flow. Each Payment + Session is controlled by a Payment Provider, who is responsible for the + communication with external payment services. Authorized Payment + Sessions will eventually get promoted to Payments to indicate that they + are authorized for capture/refunds/etc. + x-resourceId: payment_session + properties: + id: + description: >- + The id of the Payment Session. This value will be prefixed with + `ps_`. + type: string + cart_id: + description: The id of the Cart that the Payment Session is created for. + type: string + provider_id: + description: >- + The id of the Payment Provider that is responsible for the Payment + Session + type: string + is_selected: + description: >- + A flag to indicate if the Payment Session has been selected as the + method that will be used to complete the purchase. + type: boolean + status: + description: >- + Indicates the status of the Payment Session. Will default to + `pending`, and will eventually become `authorized`. Payment Sessions + may have the status of `requires_more` to indicate that further + actions are to be completed by the Customer. + type: string + enum: + - authorized + - pending + - requires_more + - error + - canceled + data: + description: >- + The data required for the Payment Provider to identify, modify and + process the Payment Session. Typically this will be an object that + holds an id to the external payment session, but can be an empty + object if the Payment Provider doesn't hold any state. + type: object + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + payment: + title: Payment + description: >- + Payments represent an amount authorized with a given payment method, + Payments can be captured, canceled or refunded. + x-resourceId: payment + properties: + id: + description: The id of the Payment. This value will be prefixed with `pay_`. + type: string + swap_id: + description: The id of the Swap that the Payment is used for. + type: string + order_id: + description: The id of the Order that the Payment is used for. + type: string + cart_id: + description: The id of the Cart that the Payment Session is created for. + type: string + amount: + description: The amount that the Payment has been authorized for. + type: integer + currency_code: + description: The 3 character ISO currency code that the Payment is completed in. + type: string + amount_refunded: + description: >- + The amount of the original Payment amount that has been refunded + back to the Customer. + type: integer + provider_id: + description: The id of the Payment Provider that is responsible for the Payment + type: string + data: + description: >- + The data required for the Payment Provider to identify, modify and + process the Payment. Typically this will be an object that holds an + id to the external payment session, but can be an empty object if + the Payment Provider doesn't hold any state. + type: object + captured_at: + description: The date with timezone at which the Payment was captured. + type: string + format: date-time + canceled_at: + description: The date with timezone at which the Payment was canceled. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_collection: + title: Product Collection + description: Product Collections represents a group of Products that are related. + x-resourceId: product_collection + properties: + id: + description: >- + The id of the Product Collection. This value will be prefixed with + `pcol_`. + type: string + title: + description: The title that the Product Collection is identified by. + type: string + handle: + description: >- + A unique string that identifies the Product Collection - can for + example be used in slug structures. + type: string + products: + description: The Products contained in the Product Collection. + type: array + items: + type: object + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_option_value: + title: Product Option Value + 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 + properties: + id: + description: >- + The id of the Product Option Value. This value will be prefixed with + `optval_`. + type: string + value: + description: >- + The value that the Product Variant has defined for the specific + Product Option (e.g. if the Product Option is "Size" this value + could be "Small", "Medium" or "Large"). + type: string + option_id: + description: >- + The id of the Product Option that the Product Option Value is + defined for. + type: string + variant_id: + description: >- + The id of the Product Variant that the Product Option Value is + defined for. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_option: + title: Product Option + description: >- + Product Options define properties that may vary between different + variants of 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 + properties: + id: + description: >- + The id of the Product Option. This value will be prefixed with + `opt_`. + type: string + title: + description: The title that the Product Option is defined by (e.g. "Size"). + type: string + values: + description: The Product Option Values that are defined for the Product Option. + type: array + items: + $ref: '#/components/schemas/product_option_value' + product_id: + description: The id of the Product that the Product Option is defined for. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_tag: + title: Product Tag + description: Product Tags can be added to Products for easy filtering and grouping. + x-resourceId: product_tag + properties: + id: + description: The id of the Product Tag. This value will be prefixed with `ptag_`. + type: string + value: + description: The value that the Product Tag represents (e.g. "Pants"). + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_type: + title: Product Type + description: >- + Product Type can be added to Products for filtering and reporting + purposes. + x-resourceId: product_type + properties: + id: + description: >- + The id of the Product Type. This value will be prefixed with + `ptyp_`. + type: string + value: + description: The value that the Product Type represents (e.g. "Clothing"). + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product_variant: + title: Product Variant + description: >- + Product Variants represent a Product with a specific set of Product + Option 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 + properties: + id: + description: >- + The id of the Product Variant. This value will be prefixed with + `variant_`. + type: string + title: + description: >- + A title that can be displayed for easy identification of the Product + Variant. + type: string + product_id: + description: The id of the Product that the Product Variant belongs to. + type: string + prices: + description: >- + The Money Amounts defined for the Product Variant. Each Money Amount + represents a price in a given currency or a price in a specific + Region. + type: array + items: + $ref: '#/components/schemas/money_amount' + sku: + description: >- + The unique stock keeping unit used to identify the Product Variant. + This will usually be a unqiue identifer for the item that is to be + shipped, and can be referenced across multiple systems. + type: string + barcode: + description: >- + A generic field for a GTIN number that can be used to identify the + Product Variant. + type: string + ean: + description: >- + An EAN barcode number that can be used to identify the Product + Variant. + type: string + upc: + description: >- + A UPC barcode number that can be used to identify the Product + Variant. + type: string + inventory_quantity: + description: The current quantity of the item that is stocked. + type: integer + allow_backorder: + description: >- + Whether the Product Variant should be purchasable when + `inventory_quantity` is 0. + type: boolean + manage_inventory: + description: Whether Medusa should manage inventory for the Product Variant. + type: boolean + hs_code: + description: >- + The Harmonized System code of the Product Variant. May be used by + Fulfillment Providers to pass customs information to shipping + carriers. + type: string + origin_country: + description: >- + The country in which the Product Variant was produced. May be used + by Fulfillment Providers to pass customs information to shipping + carriers. + type: string + mid_code: + description: >- + The Manufacturers Identification code that identifies the + manufacturer of the Product Variant. May be used by Fulfillment + Providers to pass customs information to shipping carriers. + type: string + material: + description: >- + The material and composition that the Product Variant is made of, + May be used by Fulfillment Providers to pass customs information to + shipping carriers. + type: string + weight: + description: >- + The weight of the Product Variant. May be used in shipping rate + calculations. + type: string + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + type: string + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + type: string + length: + description: >- + The length of the Product Variant. May be used in shipping rate + calculations. + type: string + options: + description: The Product Option Values specified for the Product Variant. + type: array + items: + $ref: '#/components/schemas/product_option_value' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + product: + title: Product + description: >- + Products are a grouping of Product Variants that have common properties + such as images and descriptions. Products can have multiple options + which define the properties that Product Variants differ by. + x-resourceId: product + properties: + id: + description: The id of the Product. This value will be prefixed with `prod_`. + type: string + title: + description: >- + A title that can be displayed for easy identification of the + Product. + type: string + subtitle: + description: >- + An optional subtitle that can be used to further specify the + Product. + type: string + description: + description: A short description of the Product. + type: string + handle: + description: A unique identifier for the Product (e.g. for slug structure). + type: string + is_giftcard: + description: >- + Whether the Product represents a Gift Card. Products that represent + Gift Cards will automatically generate a redeemable Gift Card code + once they are purchased. + type: boolean + images: + description: Images of the Product + type: array + items: + $ref: '#/components/schemas/image' + thumbnail: + description: A URL to an image file that can be used to identify the Product. + type: string + options: + description: >- + The Product Options that are defined for the Product. Product + Variants of the Product will have a unique combination of Product + Option Values. + type: array + items: + $ref: '#/components/schemas/product_option' + variants: + description: >- + The Product Variants that belong to the Product. Each will have a + unique combination of Product Option Values. + type: array + items: + $ref: '#/components/schemas/product_variant' + profile_id: + description: >- + The id of the Shipping Profile that the Product belongs to. Shipping + Profiles have a set of defined Shipping Options that can be used to + Fulfill a given set of Products. + type: string + hs_code: + description: >- + The Harmonized System code of the Product Variant. May be used by + Fulfillment Providers to pass customs information to shipping + carriers. + type: string + origin_country: + description: >- + The country in which the Product Variant was produced. May be used + by Fulfillment Providers to pass customs information to shipping + carriers. + type: string + mid_code: + description: >- + The Manufacturers Identification code that identifies the + manufacturer of the Product Variant. May be used by Fulfillment + Providers to pass customs information to shipping carriers. + type: string + material: + description: >- + The material and composition that the Product Variant is made of, + May be used by Fulfillment Providers to pass customs information to + shipping carriers. + type: string + weight: + description: >- + The weight of the Product Variant. May be used in shipping rate + calculations. + type: string + height: + description: >- + The height of the Product Variant. May be used in shipping rate + calculations. + type: string + width: + description: >- + The width of the Product Variant. May be used in shipping rate + calculations. + type: string + length: + description: >- + The length of the Product Variant. May be used in shipping rate + calculations. + type: string + type: + description: The Product Type of the Product (e.g. "Clothing") + anyOf: + - $ref: '#/components/schemas/product_type' + collection: + description: The Product Collection that the Product belongs to (e.g. "SS20") + anyOf: + - $ref: '#/components/schemas/product_collection' + tags: + description: The Product Tags assigned to the Product. + type: array + items: + $ref: '#/components/schemas/product_tag' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + refund: + title: Refund + description: >- + Refund represent an amount of money transfered back to the Customer for + a given reason. Refunds may occur in relation to Returns, Swaps and + Claims, but can also be initiated by a store operator. + x-resourceId: refund + properties: + id: + description: The id of the Refund. This value will be prefixed with `ref_`. + type: string + order_id: + description: The id of the Order that the Refund is related to. + type: string + amount: + description: The amount that has be refunded to the Customer. + type: integer + note: + description: An optional note explaining why the amount was refunded. + type: string + reason: + description: >- + The reason given for the Refund, will automatically be set when + processed as part of a Swap, Claim or Return. + type: string + enum: + - discount + - return + - swap + - claim + - other + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + region: + title: Region + description: >- + Regions hold settings for how Customers in a given geographical location + shop. The is, for example, where currencies and tax rates are defined. A + Region can consist of multiple countries to accomodate common shopping + settings across countries. + x-resourceId: region + properties: + id: + description: The id of the Region. This value will be prefixed with `reg_`. + type: string + name: + description: >- + The name of the region as displayed to the customer. If the Region + only has one country it is recommended to write the country name. + type: string + currency_code: + description: >- + The 3 character ISO currency code that Customers will shop in in the + Region. + type: string + tax_rate: + description: The tax rate that should be charged on purchases in the Region. + type: number + tax_code: + description: >- + The tax code used on purchases in the Region. This may be used by + other systems for accounting purposes. + type: string + countries: + description: The countries that are included in the Region. + type: array + items: + $ref: '#/components/schemas/country' + payment_providers: + description: >- + The Payment Providers that can be used to process Payments in the + Region. + type: array + items: + $ref: '#/components/schemas/payment_provider' + fulfillment_providers: + description: >- + The Fulfillment Providers that can be used to fulfill orders in the + Region. + type: array + items: + $ref: '#/components/schemas/fulfillment_provider' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + return_item: + title: Return Item + 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 + properties: + return_id: + description: The id of the Return that the Return Item belongs to. + type: string + item_id: + description: The id of the Line Item that the Return Item references. + type: string + item: + description: The Line Item that the Return Item references. + anyOf: + - $ref: '#/components/schemas/line_item' + quantity: + description: The quantity of the Line Item that is included in the Return. + type: integer + is_requested: + description: >- + Whether the Return Item was requested initially or received + unexpectedly in the warehouse. + type: boolean + requested_quantity: + description: The quantity that was originally requested to be returned. + type: integer + recieved_quantity: + description: The quantity that was received in the warehouse. + type: integer + metadata: + description: An optional key-value map with additional information. + type: object + return: + title: Return + description: >- + Return orders hold information about Line Items that a Customer wishes + to send back, along with how the items will be returned. Returns can be + used as part of a Swap. + x-resourceId: return + properties: + id: + description: The id of the Return. This value will be prefixed with `ret_`. + type: string + status: + description: Status of the Return. + type: string + enum: + - requested + - received + - requires_action + items: + description: >- + The Return Items that will be shipped back to the warehouse. type: + array items: $ref: + swap_id: + description: The id of the Swap that the Return is a part of. + type: string + order_id: + description: The id of the Order that the Return is made from. + type: string + claim_order_id: + description: The id of the Claim that the Return is a part of. + type: string + shipping_method: + description: >- + The Shipping Method that will be used to send the Return back. Can + be null if the Customer facilitates the return shipment themselves. + anyOf: + - $ref: '#/components/schemas/shipping_method' + shipping_data: + description: >- + Data about the return shipment as provided by the Fulfilment + Provider that handles the return shipment. + type: object + refund_amount: + description: The amount that should be refunded as a result of the return. + type: integer + received_at: + description: The date with timezone at which the return was received. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + shipping_method: + title: Shipping Method + description: >- + Shipping Methods represent a way in which an Order or Return can be + shipped. Shipping Methods are built from a Shipping Option, but may + contain additional details, that can be necessary for the Fulfillment + Provider to handle the shipment. + x-resourceId: shipping_method + properties: + id: + description: >- + The id of the Shipping Method. This value will be prefixed with + `sm_`. + type: string + shipping_option_id: + description: >- + The id of the Shipping Option that the Shipping Method is built + from. + type: string + shipping_option: + description: The Shipping Option that the Shipping Method is built from. + anyOf: + - $ref: '#/components/schemas/shipping_option' + order_id: + description: The id of the Order that the Shipping Method is used on. + type: string + return_id: + description: The id of the Return that the Shipping Method is used on. + type: string + swap_id: + description: The id of the Swap that the Shipping Method is used on. + type: string + cart_id: + description: The id of the Cart that the Shipping Method is used on. + type: string + claim_order_id: + description: The id of the Claim that the Shipping Method is used on. + type: string + price: + description: >- + The amount to charge for the Shipping Method. The currency of the + price is defined by the Region that the Order that the Shipping + Method belongs to is a part of. + type: integer + data: + description: >- + Additional data that the Fulfillment Provider needs to fulfill the + shipment. This is used in combination with the Shipping Options + data, and may contain information such as a drop point id. + type: object + shipping_option_requirement: + title: Shipping Option Requirement + description: >- + A requirement that a Cart must satisfy for the Shipping Option to be + available to the Cart. + x-resourceId: shipping_option_requirement + properties: + id: + description: >- + The id of the Shipping Option Requirement. This value will be + prefixed with `sor_`. + type: string + shipping_option_id: + description: >- + The id of the Shipping Option that the Shipping Option Requirement + belongs to. + type: string + type: + description: >- + The type of the requirement, this defines how the value will be + compared to the Cart's total. `min_subtotal` requirements define the + minimum subtotal that is needed for the Shipping Option to be + available, while the `max_subtotal` defines the maximum subtotal + that the Cart can have for the Shipping Option to be available. + type: string + enum: + - min_subtotal + - max_subtotal + amount: + description: The amount to compare the Cart subtotal to. + type: integer + shipping_option: + title: Shipping Option + description: >- + Shipping Options represent a way in which an Order or Return can be + shipped. Shipping Options have an associated Fulfillment Provider that + will be used when the fulfillment of an Order is initiated. Shipping + Options themselves cannot be added to Carts, but serve as a template for + Shipping Methods. This distinction makes it possible to customize + individual Shipping Methods with additional information. + x-resourceId: shipping_option + properties: + id: + description: >- + The id of the Shipping Option. This value will be prefixed with + `so_`. + type: string + name: + description: >- + The name given to the Shipping Option - this may be displayed to the + Customer. + type: string + region_id: + description: The id of the Region that the Shipping Option belongs to. + type: string + region: + description: The id of the Region that the Shipping Option belongs to. + anyOf: + - $ref: '#/components/schemas/region' + profile_id: + description: >- + The id of the Shipping Profile that the Shipping Option belongs to. + Shipping Profiles have a set of defined Shipping Options that can be + used to Fulfill a given set of Products. + type: string + provider_id: + description: >- + The id of the Fulfillment Provider, that will be used to process + Fulfillments from the Shipping Option. + type: string + price_type: + description: >- + The type of pricing calculation that is used when creatin Shipping + Methods from the Shipping Option. Can be `flat_rate` for fixed + prices or `calculated` if the Fulfillment Provider can provide price + calulations. + type: string + enum: + - flat_rate + - calculated + amount: + description: >- + The amount to charge for shipping when the Shipping Option price + type is `flat_rate`. + type: integer + is_return: + description: >- + Flag to indicate if the Shipping Option can be used for Return + shipments. + type: boolean + requirements: + description: >- + The requirements that must be satisfied for the Shipping Option to + be available for a Cart. + type: array + items: + $ref: '#/components/schemas/shipping_option_requirement' + data: + description: >- + The data needed for the Fulfillment Provider to identify the + Shipping Option. + type: object + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + shipping_profile: + title: Shipping Profile + description: >- + Shipping Profiles have a set of defined Shipping Options that can be + used to fulfill a given set of Products. + x-resourceId: shipping_profile + properties: + id: + description: >- + The id of the Shipping Profile. This value will be prefixed with + `sp_`. + type: string + name: + description: >- + The name given to the Shipping profile - this may be displayed to + the Customer. + type: string + type: + description: >- + The type of the Shipping Profile, may be `default`, `gift_card` or + `custom`. + type: string + enum: + - default + - gift_card + - custom + products: + description: The Products that the Shipping Profile defines Shipping Options for. + type: array + items: + $ref: '#/components/schemas/product' + shipping_options: + description: >- + The Shipping Options that can be used to fulfill the Products in the + Shipping Profile. + type: array + items: + anyOf: + - $ref: '#/components/schemas/shipping_option' + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + store: + title: Store + description: 'Holds settings for the Store, such as name, currencies, etc.' + x-resourceId: store + properties: + id: + description: The id of the Store. This value will be prefixed with `store_`. + type: string + name: + description: The name of the Store - this may be displayed to the Customer. + type: string + default_currency_code: + description: >- + The default currency code used when no other currency code is + specified. + type: string + currencies: + description: The currencies that are enabled for the Store. + type: array + items: + $ref: '#/components/schemas/currency' + swap_link_template: + description: >- + A template to generate Swap links from use {{cart_id}} to include + the Swap's `cart_id` in the link. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + swap: + title: Swap + description: >- + Swaps can be created when a Customer wishes to exchange Products that + they have purchased to different Products. Swaps consist of a Return of + previously purchased Products and a Fulfillment of new Products, the + amount paid for the Products being returned will be used towards payment + for the new Products. In the case where the amount paid for the the + Products being returned exceed the amount to be paid for the new + Products, a Refund will be issued for the difference. + x-resourceId: swap + properties: + id: + description: The id of the Swap. This value will be prefixed with `swap_`. + type: string + fulfillment_status: + description: The status of the Fulfillment of the Swap. + type: string + enum: + - not_fulfilled + - partially_fulfilled + - fulfilled + - partially_shipped + - shipped + - partially_returned + - returned + - canceled + - requires_action + payment_status: + description: >- + The status of the Payment of the Swap. The payment may either refer + to the refund of an amount or the authorization of a new amount. + type: string + enum: + - not_paid + - awaiting + - captured + - canceled + - difference_refunded + - requires_action + order_id: + description: >- + The id of the Order where the Line Items to be returned where + purchased. + type: string + additional_items: + description: The new Line Items to ship to the Customer. + type: array + items: + $ref: '#/components/schemas/line_item' + return_order: + description: The Return that is issued for the return part of the Swap. + anyOf: + - $ref: '#/components/schemas/return' + fulfillments: + description: The Fulfillments used to send the new Line Items. + type: array + items: + $ref: '#/components/schemas/fulfillment' + payment: + description: >- + The Payment authorized when the Swap requires an additional amount + to be charged from the Customer. + anyOf: + - $ref: '#/components/schemas/payment' + difference_due: + description: >- + The difference that is paid or refunded as a result of the Swap. May + be negative when the amount paid for the returned items exceed the + total of the new Products. + type: integer + shipping_address: + description: >- + The Address to send the new Line Items to - in most cases this will + be the same as the shipping address on the Order. + anyOf: + - $ref: '#/components/schemas/address' + shipping_methods: + description: The Shipping Methods used to fulfill the addtional items purchased. + type: array + items: + $ref: '#/components/schemas/shipping_method' + cart_id: + description: The id of the Cart that the Customer will use to confirm the Swap. + type: string + confirmed_at: + description: >- + The date with timezone at which the Swap was confirmed by the + Customer. + type: string + format: date-time + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + tracking_link: + title: Tracking Link + description: >- + Tracking Link holds information about tracking numbers for a + Fulfillment. Tracking Links can optionally contain a URL that can be + visited to see the status of the shipment. + x-resourceId: tracking_link + properties: + id: + description: >- + The id of the Tracking Link. This value will be prefixed with + `tlink_`. + type: string + url: + description: The URL at which the status of the shipment can be tracked. + type: string + tracking_number: + description: The tracking number given by the shipping carrier. + type: string + fulfillment_id: + description: The id of the Fulfillment that the Tracking Link references. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time + metadata: + description: An optional key-value map with additional information. + type: object + user: + title: User + description: Represents a User who can manage store settings. + x-resourceId: user + properties: + id: + description: The unique id of the User. This will be prefixed with `usr_` + type: string + email: + description: The email of the User + type: string + first_name: + type: string + last_name: + description: The Customer's billing address. + anyOf: + - $ref: '#/components/schemas/address' + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + metadata: + type: object diff --git a/lerna-debug.log b/lerna-debug.log deleted file mode 100644 index df89e4d367..0000000000 --- a/lerna-debug.log +++ /dev/null @@ -1,9 +0,0 @@ -0 silly argv { _: [ 'bootstrap' ], -0 silly argv lernaVersion: '3.22.1', -0 silly argv '$0': '/usr/local/bin/lerna' } -1 notice cli v3.22.1 -2 verbose rootPath /Users/srindom/Developer/medusa-js -3 info versioning independent -4 error JSONError: Unexpected token < in JSON at position 34 while parsing near '...edusa-file-spaces",<<<<<<< HEAD "vers...' in packages/medusa-file-spaces/package.json -4 error at module.exports (/Users/srindom/Developer/medusa-js/node_modules/parse-json/index.js:26:19) -4 error at parse (/Users/srindom/Developer/medusa-js/node_modules/load-json-file/index.js:15:9) diff --git a/package.json b/package.json index 8e97f97e0c..2ef0a9fa86 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,11 @@ "bootstrap": "lerna bootstrap", "jest": "jest", "test": "jest", - "test:integration": "jest --config=integration-tests/jest.config.js --runInBand" + "test:integration": "jest --config=integration-tests/jest.config.js --runInBand", + "test:fixtures": "jest --config=docs-util/jest.config.js --runInBand" + }, + "dependencies": { + "oas-normalize": "^2.3.1", + "swagger-inline": "^3.2.2" } } diff --git a/packages/medusa/src/api/routes/admin/auth/create-session.js b/packages/medusa/src/api/routes/admin/auth/create-session.js index dbcdb4fa3e..2643974152 100644 --- a/packages/medusa/src/api/routes/admin/auth/create-session.js +++ b/packages/medusa/src/api/routes/admin/auth/create-session.js @@ -2,6 +2,26 @@ import jwt from "jsonwebtoken" import { Validator } from "medusa-core-utils" import config from "../../../../config" +/** + * @oas [post] /auth + * operationId: "PostAuth" + * summary: "Authenticate a User" + * description: "Logs a User in and authorizes them to manage Store settings." + * parameters: + * - (body) email=* {string} The User's email. + * - (body) password=* {string} The User's password. + * tags: + * - Auth + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/user" + */ export default async (req, res) => { const { body } = req const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/auth/get-session.js b/packages/medusa/src/api/routes/admin/auth/get-session.js index e94685f468..59bdc5fa61 100644 --- a/packages/medusa/src/api/routes/admin/auth/get-session.js +++ b/packages/medusa/src/api/routes/admin/auth/get-session.js @@ -1,5 +1,22 @@ import passport from "passport" +/** + * @oas [get] /auth + * operationId: "GetAuth" + * summary: "Get Session" + * description: "Gets the currently logged in User." + * tags: + * - Auth + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/user" + */ export default async (req, res) => { const userService = req.scope.resolve("userService") const user = await userService.retrieve(req.user.userId) diff --git a/packages/medusa/src/api/routes/admin/collections/create-collection.js b/packages/medusa/src/api/routes/admin/collections/create-collection.js index 31f2c02e0e..604f0d795d 100644 --- a/packages/medusa/src/api/routes/admin/collections/create-collection.js +++ b/packages/medusa/src/api/routes/admin/collections/create-collection.js @@ -1,5 +1,38 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /collections + * operationId: "PostCollections" + * summary: "Create a Product Collection" + * description: "Creates a Product Collection." + * requestBody: + * content: + * application/json: + * schema: + * required: + * - title + * properties: + * title: + * type: string + * description: The title to identify the Collection by. + * handle: + * type: string + * description: An optional handle to be used in slugs, if none is provided we will kebab-case the title. + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Collection + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * collection: + * $ref: "#/components/schemas/product_collection" + */ export default async (req, res) => { const schema = Validator.object().keys({ title: Validator.string().required(), diff --git a/packages/medusa/src/api/routes/admin/collections/delete-collection.js b/packages/medusa/src/api/routes/admin/collections/delete-collection.js index 20fd34783e..2d6bed6958 100644 --- a/packages/medusa/src/api/routes/admin/collections/delete-collection.js +++ b/packages/medusa/src/api/routes/admin/collections/delete-collection.js @@ -1,3 +1,28 @@ +/** + * @oas [delete] /collections/{id} + * operationId: "DeleteCollectionsCollection" + * summary: "Delete a Product Collection" + * description: "Deletes a Product Collection." + * parameters: + * - (path) id=* {string} The id of the Collection. + * tags: + * - Collection + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Collection + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/collections/get-collection.js b/packages/medusa/src/api/routes/admin/collections/get-collection.js index a32b2eab28..e883fc4dc2 100644 --- a/packages/medusa/src/api/routes/admin/collections/get-collection.js +++ b/packages/medusa/src/api/routes/admin/collections/get-collection.js @@ -1,3 +1,23 @@ +/** + * @oas [get] /collections/{id} + * operationId: "GetCollectionsCollection" + * summary: "Retrieve a Product Collection" + * description: "Retrieves a Product Collection." + * parameters: + * - (path) id=* {string} The id of the Product Collection + * tags: + * - Collection + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * collection: + * $ref: "#/components/schemas/product_collection" + */ + export default async (req, res) => { const { id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/collections/list-collections.js b/packages/medusa/src/api/routes/admin/collections/list-collections.js index f6d7fb02a6..b932d79159 100644 --- a/packages/medusa/src/api/routes/admin/collections/list-collections.js +++ b/packages/medusa/src/api/routes/admin/collections/list-collections.js @@ -1,5 +1,22 @@ import { defaultFields, defaultRelations } from "." +/** + * @oas [get] /collections + * operationId: "GetCollections" + * summary: "List Product Collections" + * description: "Retrieve a list of Product Collection." + * tags: + * - Collection + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * collection: + * $ref: "#/components/schemas/product_collection" + */ export default async (req, res) => { try { const selector = {} diff --git a/packages/medusa/src/api/routes/admin/collections/update-collection.js b/packages/medusa/src/api/routes/admin/collections/update-collection.js index 66738f09ff..9b191f3ab4 100644 --- a/packages/medusa/src/api/routes/admin/collections/update-collection.js +++ b/packages/medusa/src/api/routes/admin/collections/update-collection.js @@ -1,5 +1,38 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /collections/{id} + * operationId: "PostCollectionsCollection" + * summary: "Update a Product Collection" + * description: "Updates a Product Collection." + * parameters: + * - (path) id=* {string} The id of the Collection. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * title: + * type: string + * description: The title to identify the Collection by. + * handle: + * type: string + * description: An optional handle to be used in slugs, if none is provided we will kebab-case the title. + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Collection + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * collection: + * $ref: "#/components/schemas/product_collection" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/customers/create-customer.js b/packages/medusa/src/api/routes/admin/customers/create-customer.js index 32d4cef0c0..e21d078275 100644 --- a/packages/medusa/src/api/routes/admin/customers/create-customer.js +++ b/packages/medusa/src/api/routes/admin/customers/create-customer.js @@ -1,5 +1,27 @@ import { Validator, MedusaError } from "medusa-core-utils" +/** + * @oas [post] /customers + * operationId: "PostCustomers" + * summary: "Create a Customer" + * description: "Creates a Customer." + * parameters: + * - (body) email=* {string} The Customer's email address. + * - (body) first_name=* {string} The Customer's first name. + * - (body) last_name=* {string} The Customer's last name. + * - (body) phone {string} The Customer's phone number. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const schema = Validator.object().keys({ email: Validator.string() diff --git a/packages/medusa/src/api/routes/admin/customers/get-customer.js b/packages/medusa/src/api/routes/admin/customers/get-customer.js index 65841fb91b..e1e8e99c80 100644 --- a/packages/medusa/src/api/routes/admin/customers/get-customer.js +++ b/packages/medusa/src/api/routes/admin/customers/get-customer.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /customers/{id} + * operationId: "GetCustomersCustomer" + * summary: "Retrieve a Customer" + * description: "Retrieves a Customer." + * parameters: + * - (path) id=* {string} The id of the Customer. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/customers/list-customers.js b/packages/medusa/src/api/routes/admin/customers/list-customers.js index e0bcb9b9c8..1d7c64d9f2 100644 --- a/packages/medusa/src/api/routes/admin/customers/list-customers.js +++ b/packages/medusa/src/api/routes/admin/customers/list-customers.js @@ -1,3 +1,20 @@ +/** + * @oas [get] /customers + * operationId: "GetCustomers" + * summary: "List Customers" + * description: "Retrieves a list of Customers." + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { try { const customerService = req.scope.resolve("customerService") diff --git a/packages/medusa/src/api/routes/admin/customers/update-customer.js b/packages/medusa/src/api/routes/admin/customers/update-customer.js index 93e18ce901..c85475e31e 100644 --- a/packages/medusa/src/api/routes/admin/customers/update-customer.js +++ b/packages/medusa/src/api/routes/admin/customers/update-customer.js @@ -1,5 +1,38 @@ import { Validator, MedusaError } from "medusa-core-utils" +/** + * @oas [post] /customers/{id} + * operationId: "PostCustomersCustomer" + * summary: "Update a Customer" + * description: "Updates a Customer." + * parameters: + * - (path) id=* {string} The id of the Customer. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * first_name: + * type: string + * description: The Customer's first name. + * last_name: + * type: string + * description: The Customer's last name. + * phone: + * description: The Customer's phone number. + * type: object + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/discounts/add-region.js b/packages/medusa/src/api/routes/admin/discounts/add-region.js index 75128ab73a..849018b29d 100644 --- a/packages/medusa/src/api/routes/admin/discounts/add-region.js +++ b/packages/medusa/src/api/routes/admin/discounts/add-region.js @@ -1,5 +1,25 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /discounts/{id}/regions/{region_id} + * operationId: "PostDiscountsDiscountRegionsRegion" + * summary: "Adds Region availability" + * description: "Adds a Region to the list of Regions that a Discount can be used in." + * parameters: + * - (path) id=* {string} The id of the Discount. + * - (path) region_id=* {string} The id of the Region. + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id, region_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/discounts/add-valid-product.js b/packages/medusa/src/api/routes/admin/discounts/add-valid-product.js index 86072e09d4..e72e136d73 100644 --- a/packages/medusa/src/api/routes/admin/discounts/add-valid-product.js +++ b/packages/medusa/src/api/routes/admin/discounts/add-valid-product.js @@ -1,5 +1,25 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /discounts/{id}/products/{product_id} + * operationId: "PostDiscountsDiscountProductsProduct" + * summary: "Adds Product availability" + * description: "Adds a Product to the list of Products that a Discount can be used for." + * parameters: + * - (path) id=* {string} The id of the Discount. + * - (path) product_id=* {string} The id of the Product. + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id, variant_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/discounts/create-discount.js b/packages/medusa/src/api/routes/admin/discounts/create-discount.js index c4fa592a15..207258031f 100644 --- a/packages/medusa/src/api/routes/admin/discounts/create-discount.js +++ b/packages/medusa/src/api/routes/admin/discounts/create-discount.js @@ -1,5 +1,56 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /discounts + * operationId: "PostDiscounts" + * summary: "Creates a Discount" + * description: "Creates a Discount with a given set of rules that define how the Discount behaves." + * requestBody: + * content: + * application/json: + * schema: + * properties: + * code: + * type: string + * description: A unique code that will be used to redeem the Discount + * is_dynamic: + * type: string + * description: Whether the Discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated codes that all have to follow a common set of rules. + * rule: + * description: The Discount Rule that defines how Discounts are calculated + * oneOf: + * - $ref: "#/components/schemas/discount_rule" + * is_disabled: + * type: boolean + * description: Whether the Discount code is disabled on creation. You will have to enable it later to make it available to Customers. + * starts_at: + * type: string + * format: date-time + * description: The time at which the Discount should be available. + * ends_at: + * type: string + * format: date-time + * description: The time at which the Discount should no longer be available. + * regions: + * description: A list of Region ids representing the Regions in which the Discount can be used. + * type: array + * items: + * type: string + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const schema = Validator.object().keys({ code: Validator.string().required(), diff --git a/packages/medusa/src/api/routes/admin/discounts/create-dynamic-code.js b/packages/medusa/src/api/routes/admin/discounts/create-dynamic-code.js index 09d08cbea6..b393c19d8a 100644 --- a/packages/medusa/src/api/routes/admin/discounts/create-dynamic-code.js +++ b/packages/medusa/src/api/routes/admin/discounts/create-dynamic-code.js @@ -1,5 +1,26 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /discounts/{id}/dynamic-codes + * operationId: "PostDiscountsDiscountDynamicCodes" + * summary: "Create a dynamic Discount code" + * description: "Creates a unique code that can map to a parent Discount. This is useful if you want to automatically generate codes with the same behaviour." + * parameters: + * - (path) id=* {string} The id of the Discount to create the dynamic code from." + * - (body) code=* {string} The unique code that will be used to redeem the Discount. + * - (body) metadata {object} An optional set of key-value paris to hold additional information. + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/discounts/delete-discount.js b/packages/medusa/src/api/routes/admin/discounts/delete-discount.js index 5cecd87bb5..2e424e6d2a 100644 --- a/packages/medusa/src/api/routes/admin/discounts/delete-discount.js +++ b/packages/medusa/src/api/routes/admin/discounts/delete-discount.js @@ -1,3 +1,28 @@ +/** + * @oas [delete] /discounts/{id} + * operationId: "DeleteDiscountsDiscount" + * summary: "Delete a Discount" + * description: "Deletes a Discount." + * parameters: + * - (path) id=* {string} The id of the Discount + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Discount + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { discount_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/discounts/delete-dynamic-code.js b/packages/medusa/src/api/routes/admin/discounts/delete-dynamic-code.js index 81160abe10..94739911c6 100644 --- a/packages/medusa/src/api/routes/admin/discounts/delete-dynamic-code.js +++ b/packages/medusa/src/api/routes/admin/discounts/delete-dynamic-code.js @@ -1,3 +1,23 @@ +/** + * @oas [delete] /discounts/{id}/dynamic-codes/{code} + * operationId: "DeleteDiscountsDiscountDynamicCodesCode" + * summary: "Delete a dynamic code" + * description: "Deletes a dynamic code from a Discount." + * parameters: + * - (path) id=* {string} The id of the Discount + * - (path) code=* {string} The id of the Discount + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id, code } = req.params diff --git a/packages/medusa/src/api/routes/admin/discounts/get-discount.js b/packages/medusa/src/api/routes/admin/discounts/get-discount.js index 3c7dd052dc..968093da92 100644 --- a/packages/medusa/src/api/routes/admin/discounts/get-discount.js +++ b/packages/medusa/src/api/routes/admin/discounts/get-discount.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /discounts/{id} + * operationId: "GetDiscountsDiscount" + * summary: "Retrieve a Discount" + * description: "Retrieves a Discount" + * parameters: + * - (path) id=* {string} The id of the Discount + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/discounts/list-discounts.js b/packages/medusa/src/api/routes/admin/discounts/list-discounts.js index eec1846a8d..1790df836e 100644 --- a/packages/medusa/src/api/routes/admin/discounts/list-discounts.js +++ b/packages/medusa/src/api/routes/admin/discounts/list-discounts.js @@ -1,5 +1,22 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /discounts + * operationId: "GetDiscounts" + * summary: "List Discounts" + * description: "Retrieves a list of Discounts" + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { try { const discountService = req.scope.resolve("discountService") diff --git a/packages/medusa/src/api/routes/admin/discounts/remove-region.js b/packages/medusa/src/api/routes/admin/discounts/remove-region.js index 358533cb0d..cf9e9623b9 100644 --- a/packages/medusa/src/api/routes/admin/discounts/remove-region.js +++ b/packages/medusa/src/api/routes/admin/discounts/remove-region.js @@ -1,5 +1,25 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [delete] /discounts/{id}/regions/{region_id} + * operationId: "DeleteDiscountsDiscountRegionsRegion" + * summary: "Remove Region availability" + * description: "Removes a Region from the list of Regions that a Discount can be used in." + * parameters: + * - (path) id=* {string} The id of the Discount. + * - (path) region_id=* {string} The id of the Region. + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id, region_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/discounts/remove-valid-product.js b/packages/medusa/src/api/routes/admin/discounts/remove-valid-product.js index ed620dfc47..7d67d7e13d 100644 --- a/packages/medusa/src/api/routes/admin/discounts/remove-valid-product.js +++ b/packages/medusa/src/api/routes/admin/discounts/remove-valid-product.js @@ -1,5 +1,25 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /discounts/{id}/products/{product_id} + * operationId: "DeleteDiscountsDiscountProductsProduct" + * summary: "Remove Product availability" + * description: "Removes a Product from the list of Products that a Discount can be used for." + * parameters: + * - (path) id=* {string} The id of the Discount. + * - (path) product_id=* {string} The id of the Product. + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id, variant_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/discounts/update-discount.js b/packages/medusa/src/api/routes/admin/discounts/update-discount.js index f8b6f94903..86b6b0f867 100644 --- a/packages/medusa/src/api/routes/admin/discounts/update-discount.js +++ b/packages/medusa/src/api/routes/admin/discounts/update-discount.js @@ -1,6 +1,56 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /discounts/{id} + * operationId: "PostDiscountsDiscount" + * summary: "Update a Discount" + * description: "Updates a Discount with a given set of rules that define how the Discount behaves." + * parameters: + * - (path) id=* {string} The id of the Discount. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * code: + * type: string + * description: A unique code that will be used to redeem the Discount + * is_dynamic: + * type: string + * description: Whether the Discount should have multiple instances of itself, each with a different code. This can be useful for automatically generated codes that all have to follow a common set of rules. + * rule: + * description: The Discount Rule that defines how Discounts are calculated + * oneOf: + * - $ref: "#/components/schemas/discount_rule" + * is_disabled: + * type: boolean + * description: Whether the Discount code is disabled on creation. You will have to enable it later to make it available to Customers. + * starts_at: + * type: string + * format: date-time + * description: The time at which the Discount should be available. + * ends_at: + * type: string + * format: date-time + * description: The time at which the Discount should no longer be available. + * regions: + * description: A list of Region ids representing the Regions in which the Discount can be used. + * type: array + * items: + * type: string + * tags: + * - Discount + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * discount: + * $ref: "#/components/schemas/discount" + */ export default async (req, res) => { const { discount_id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/gift-cards/create-gift-card.js b/packages/medusa/src/api/routes/admin/gift-cards/create-gift-card.js index 4aab253c55..7b6d1e6877 100644 --- a/packages/medusa/src/api/routes/admin/gift-cards/create-gift-card.js +++ b/packages/medusa/src/api/routes/admin/gift-cards/create-gift-card.js @@ -1,6 +1,46 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /gift-cards + * operationId: "PostGiftCards" + * summary: "Create a Gift Card" + * description: "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region." + * requestBody: + * content: + * application/json: + * schema: + * properties: + * value: + * type: integer + * description: The value (excluding VAT) that the Gift Card should represent. + * is_disabled: + * type: boolean + * description: Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers. + * ends_at: + * type: string + * format: date-time + * description: The time at which the Gift Card should no longer be available. + * region_id: + * description: The id of the Region in which the Gift Card can be used. + * type: array + * items: + * type: string + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Gift Card + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * gift_card: + * $ref: "#/components/schemas/gift_card" + */ export default async (req, res) => { const schema = Validator.object().keys({ value: Validator.number() diff --git a/packages/medusa/src/api/routes/admin/gift-cards/delete-gift-card.js b/packages/medusa/src/api/routes/admin/gift-cards/delete-gift-card.js index 9e789716b3..664728956a 100644 --- a/packages/medusa/src/api/routes/admin/gift-cards/delete-gift-card.js +++ b/packages/medusa/src/api/routes/admin/gift-cards/delete-gift-card.js @@ -1,3 +1,28 @@ +/** + * @oas [delete] /gift-cards/{id} + * operationId: "DeleteGiftCardsGiftCard" + * summary: "Delete a Gift Card" + * description: "Deletes a Gift Card" + * parameters: + * - (path) id=* {string} The id of the Gift Card to delete. + * tags: + * - Gift Card + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Gift Card + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/gift-cards/get-gift-card.js b/packages/medusa/src/api/routes/admin/gift-cards/get-gift-card.js index b40021ae48..901bd1dfc6 100644 --- a/packages/medusa/src/api/routes/admin/gift-cards/get-gift-card.js +++ b/packages/medusa/src/api/routes/admin/gift-cards/get-gift-card.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /gift-cards/{id} + * operationId: "GetGiftCardsGiftCard" + * summary: "Retrieve a Gift Card" + * description: "Retrieves a Gift Card." + * parameters: + * - (path) id=* {string} The id of the Gift Card. + * tags: + * - Gift Card + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * gift_card: + * $ref: "#/components/schemas/gift_card" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/gift-cards/list-gift-cards.js b/packages/medusa/src/api/routes/admin/gift-cards/list-gift-cards.js index d54bab12e9..10791e6235 100644 --- a/packages/medusa/src/api/routes/admin/gift-cards/list-gift-cards.js +++ b/packages/medusa/src/api/routes/admin/gift-cards/list-gift-cards.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /gift-cards + * operationId: "GetGiftCards" + * summary: "List Gift Cards" + * description: "Retrieves a list of Gift Cards." + * tags: + * - Gift Card + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * gift_cards: + * type: array + * items: + * $ref: "#/components/schemas/gift_card" + */ export default async (req, res) => { try { const selector = {} diff --git a/packages/medusa/src/api/routes/admin/gift-cards/update-gift-card.js b/packages/medusa/src/api/routes/admin/gift-cards/update-gift-card.js index a225590120..6c90578dd2 100644 --- a/packages/medusa/src/api/routes/admin/gift-cards/update-gift-card.js +++ b/packages/medusa/src/api/routes/admin/gift-cards/update-gift-card.js @@ -1,5 +1,47 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /gift-cards/{id} + * operationId: "PostGiftCardsGiftCard" + * summary: "Create a Gift Card" + * description: "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region." + * parameters: + * - (path) id=* {string} The id of the Gift Card. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * balance: + * type: integer + * description: The value (excluding VAT) that the Gift Card should represent. + * is_disabled: + * type: boolean + * description: Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers. + * ends_at: + * type: string + * format: date-time + * description: The time at which the Gift Card should no longer be available. + * region_id: + * description: The id of the Region in which the Gift Card can be used. + * type: array + * items: + * type: string + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Gift Card + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * gift_card: + * $ref: "#/components/schemas/gift_card" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/notifications/list-notifications.js b/packages/medusa/src/api/routes/admin/notifications/list-notifications.js index 373fa6222b..513f0e6b88 100644 --- a/packages/medusa/src/api/routes/admin/notifications/list-notifications.js +++ b/packages/medusa/src/api/routes/admin/notifications/list-notifications.js @@ -1,6 +1,25 @@ import _ from "lodash" import { defaultRelations, defaultFields } from "./" +/** + * @oas [get] /notifications + * operationId: "GetNotifications" + * summary: "List Notifications" + * description: "Retrieves a list of Notifications." + * tags: + * - Notification + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * notifications: + * type: array + * items: + * $ref: "#/components/schemas/notification" + */ export default async (req, res) => { try { const notificationService = req.scope.resolve("notificationService") diff --git a/packages/medusa/src/api/routes/admin/notifications/resend-notification.js b/packages/medusa/src/api/routes/admin/notifications/resend-notification.js index ca9b62b9b5..92f94220c6 100644 --- a/packages/medusa/src/api/routes/admin/notifications/resend-notification.js +++ b/packages/medusa/src/api/routes/admin/notifications/resend-notification.js @@ -1,6 +1,25 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /notifications/{id}/resend + * operationId: "PostNotificationsNotificationResend" + * summary: "Resend Notification" + * description: "Resends a previously sent notifications, with the same data but optionally to a different address" + * parameters: + * - (path) id=* {string} The id of the Notification + * tags: + * - Notification + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * notification: + * $ref: "#/components/schemas/notification" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/add-shipping-method.js b/packages/medusa/src/api/routes/admin/orders/add-shipping-method.js index dbf7b084ee..b4d9bfcc28 100644 --- a/packages/medusa/src/api/routes/admin/orders/add-shipping-method.js +++ b/packages/medusa/src/api/routes/admin/orders/add-shipping-method.js @@ -2,6 +2,28 @@ import _ from "lodash" import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /orders/{id}/shipping-methods + * operationId: "PostOrdersOrderShippingMethods" + * summary: "Add a Shipping Method" + * description: "Adds a Shipping Method to an Order. If another Shipping Method exists with the same Shipping Profile, the previous Shipping Method will be replaced." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (body) price=* {integer} The price (excluding VAT) that should be charged for the Shipping Method + * - (body) option_id=* {string} The id of the Shipping Option to create the Shipping Method from. + * - (body) data=* {object} The data required for the Shipping Option to create a Shipping Method. This will depend on the Fulfillment Provider. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/cancel-order.js b/packages/medusa/src/api/routes/admin/orders/cancel-order.js index a16d865ce2..8501195208 100644 --- a/packages/medusa/src/api/routes/admin/orders/cancel-order.js +++ b/packages/medusa/src/api/routes/admin/orders/cancel-order.js @@ -1,3 +1,22 @@ +/** + * @oas [post] /orders/{id}/cancel + * operationId: "PostOrdersOrderCancel" + * summary: "Cancel an Order" + * description: "Registers an Order as canceled. This triggers a flow that will cancel any created Fulfillments and Payments, may fail if the Payment or Fulfillment Provider is unable to cancel the Payment/Fulfillment." + * parameters: + * - (path) id=* {string} The id of the Order. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/capture-payment.js b/packages/medusa/src/api/routes/admin/orders/capture-payment.js index 07a9126705..0733dead64 100644 --- a/packages/medusa/src/api/routes/admin/orders/capture-payment.js +++ b/packages/medusa/src/api/routes/admin/orders/capture-payment.js @@ -1,5 +1,24 @@ import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/capture + * operationId: "PostOrdersOrderCapture" + * summary: "Capture an Order" + * description: "Captures all the Payments associated with an Order." + * parameters: + * - (path) id=* {string} The id of the Order. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/create-claim-shipment.js b/packages/medusa/src/api/routes/admin/orders/create-claim-shipment.js index d4c6c36a0c..6f745812b9 100644 --- a/packages/medusa/src/api/routes/admin/orders/create-claim-shipment.js +++ b/packages/medusa/src/api/routes/admin/orders/create-claim-shipment.js @@ -1,6 +1,39 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /orders/{id}/claims/{claim_id}/shipments + * operationId: "PostOrdersOrderClaimsClaimShipments" + * summary: "Create Claim Shipment" + * description: "Registers a Claim Fulfillment as shipped." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) claim_id=* {string} The id of the Claim. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * fulfillment_id: + * description: The id of the Fulfillment. + * type: string + * tracking_numbers: + * description: The tracking numbers for the shipment. + * type: array + * items: + * type: string + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, claim_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/create-claim.js b/packages/medusa/src/api/routes/admin/orders/create-claim.js index 1b8370a5c2..a95c8b2c18 100644 --- a/packages/medusa/src/api/routes/admin/orders/create-claim.js +++ b/packages/medusa/src/api/routes/admin/orders/create-claim.js @@ -1,6 +1,108 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /order/{id}/claims + * operationId: "PostOrdersOrderClaims" + * summary: "Create a Claim" + * description: "Creates a Claim." + * parameters: + * - (path) id=* {string} The id of the Order. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * type: + * description: "The type of the Claim. This will determine how the Claim is treated: `replace` Claims will result in a Fulfillment with new items being created, while a `refund` Claim will refund the amount paid for the claimed items." + * type: string + * enum: + * - replace + * - refund + * claim_items: + * description: The Claim Items that the Claim will consist of. + * type: array + * items: + * properties: + * item_id: + * description: The id of the Line Item that will be claimed. + * type: string + * quantity: + * description: The number of items that will be returned + * type: integer + * note: + * description: Short text describing the Claim Item in further detail. + * type: string + * reason: + * description: The reason for the Claim + * type: string + * enum: + * - missing_item + * - wrong_item + * - production_failure + * - other + * tags: + * description: A list o tags to add to the Claim Item + * type: array + * items: + * type: string + * images: + * description: A list of image URL's that will be associated with the Claim + * items: + * type: string + * return_shipping: + * description: Optional details for the Return Shipping Method, if the items are to be sent back. + * type: object + * properties: + * option_id: + * type: string + * description: The id of the Shipping Option to create the Shipping Method from. + * price: + * type: integer + * description: The price to charge for the Shipping Method. + * additional_items: + * description: The new items to send to the Customer when the Claim type is Replace. + * type: array + * items: + * properties: + * variant_id: + * description: The id of the Product Variant to ship. + * type: string + * quantity: + * description: The quantity of the Product Variant to ship. + * type: integer + * shipping_methods: + * description: The Shipping Methods to send the additional Line Items with. + * type: array + * items: + * properties: + * id: + * description: The id of an existing Shipping Method + * type: string + * option_id: + * description: The id of the Shipping Option to create a Shipping Method from + * type: string + * price: + * description: The price to charge for the Shipping Method + * type: integer + * refund_amount: + * description: The amount to refund the Customer when the Claim type is `refund`. + * type: integer + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/create-fulfillment.js b/packages/medusa/src/api/routes/admin/orders/create-fulfillment.js index 8e918e915a..f8ccab4ac1 100644 --- a/packages/medusa/src/api/routes/admin/orders/create-fulfillment.js +++ b/packages/medusa/src/api/routes/admin/orders/create-fulfillment.js @@ -1,6 +1,44 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/fulfillments + * operationId: "PostOrdersOrderFulfillments" + * summary: "Create a Fulfillment" + * description: "Creates a Fulfillment of an Order - will notify Fulfillment Providers to prepare a shipment." + * parameters: + * - (path) id=* {string} The id of the Order. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * items: + * description: The Line Items to include in the Fulfillment. + * type: array + * items: + * properties: + * item_id: + * description: The id of Line Item to fulfill. + * type: string + * quantity: + * description: The quantity of the Line Item to fulfill. + * type: integer + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/create-shipment.js b/packages/medusa/src/api/routes/admin/orders/create-shipment.js index 2a5a097641..a371ef244f 100644 --- a/packages/medusa/src/api/routes/admin/orders/create-shipment.js +++ b/packages/medusa/src/api/routes/admin/orders/create-shipment.js @@ -1,6 +1,38 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/shipment + * operationId: "PostOrdersOrderShipment" + * summary: "Create a Shipment" + * description: "Registers a Fulfillment as shipped." + * parameters: + * - (path) id=* {string} The id of the Order. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * fulfillment_id: + * description: The id of the Fulfillment. + * type: string + * tracking_numbers: + * description: The tracking numbers for the shipment. + * type: array + * items: + * type: string + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/create-swap-shipment.js b/packages/medusa/src/api/routes/admin/orders/create-swap-shipment.js index a407570f81..702d886cb5 100644 --- a/packages/medusa/src/api/routes/admin/orders/create-swap-shipment.js +++ b/packages/medusa/src/api/routes/admin/orders/create-swap-shipment.js @@ -1,6 +1,39 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /orders/{id}/swaps/{swap_id}/shipments + * operationId: "PostOrdersOrderSwapsSwapShipments" + * summary: "Create Swap Shipment" + * description: "Registers a Swap Fulfillment as shipped." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) swap_id=* {string} The id of the Swap. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * fulfillment_id: + * description: The id of the Fulfillment. + * type: string + * tracking_numbers: + * description: The tracking numbers for the shipment. + * type: array + * items: + * type: string + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, swap_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/create-swap.js b/packages/medusa/src/api/routes/admin/orders/create-swap.js index 6910966c09..4b78d0ca09 100644 --- a/packages/medusa/src/api/routes/admin/orders/create-swap.js +++ b/packages/medusa/src/api/routes/admin/orders/create-swap.js @@ -1,6 +1,62 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /order/{id}/swaps + * operationId: "PostOrdersOrderSwaps" + * summary: "Create a Swap" + * description: "Creates a Swap. Swaps are used to handle Return of previously purchased goods and Fulfillment of replacements simultaneously." + * parameters: + * - (path) id=* {string} The id of the Swap. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * return_items: + * description: The Line Items to return as part of the Swap. + * type: array + * items: + * properties: + * item_id: + * description: The id of the Line Item that will be claimed. + * type: string + * quantity: + * description: The number of items that will be returned + * type: integer + * return_shipping: + * description: How the Swap will be returned. + * type: object + * properties: + * option_id: + * type: string + * description: The id of the Shipping Option to create the Shipping Method from. + * price: + * type: integer + * description: The price to charge for the Shipping Method. + * additional_items: + * description: The new items to send to the Customer. + * type: array + * items: + * properties: + * variant_id: + * description: The id of the Product Variant to ship. + * type: string + * quantity: + * description: The quantity of the Product Variant to ship. + * type: integer + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/delete-metadata.js b/packages/medusa/src/api/routes/admin/orders/delete-metadata.js index 9267fea4d5..d5a7b3023c 100644 --- a/packages/medusa/src/api/routes/admin/orders/delete-metadata.js +++ b/packages/medusa/src/api/routes/admin/orders/delete-metadata.js @@ -1,3 +1,23 @@ +/** + * @oas [delete] /order/{id}/metadata/{key} + * operationId: "DeleteOrdersOrderMetadataKey" + * summary: "Delete Metadata" + * description: "Deletes a metadata key." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) key=* {string} The metadata key. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, key } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/fulfill-claim.js b/packages/medusa/src/api/routes/admin/orders/fulfill-claim.js index a22c6dc9c8..50668a16c2 100644 --- a/packages/medusa/src/api/routes/admin/orders/fulfill-claim.js +++ b/packages/medusa/src/api/routes/admin/orders/fulfill-claim.js @@ -1,6 +1,34 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/claims/{claim_id}/fulfillments + * operationId: "PostOrdersOrderClaimsClaimFulfillments" + * summary: "Create a Claim Fulfillment" + * description: "Creates a Fulfillment for a Claim." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) claim_id=* {string} The id of the Claim. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, claim_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/fulfill-swap.js b/packages/medusa/src/api/routes/admin/orders/fulfill-swap.js index f169507545..7212614f49 100644 --- a/packages/medusa/src/api/routes/admin/orders/fulfill-swap.js +++ b/packages/medusa/src/api/routes/admin/orders/fulfill-swap.js @@ -1,6 +1,34 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/swaps/{swap_id}/fulfillments + * operationId: "PostOrdersOrderSwapsSwapFulfillments" + * summary: "Create a Swap Fulfillment" + * description: "Creates a Fulfillment for a Swap." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) swap_id=* {string} The id of the Swap. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, swap_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/get-order.js b/packages/medusa/src/api/routes/admin/orders/get-order.js index ea3b752132..55ce880eff 100644 --- a/packages/medusa/src/api/routes/admin/orders/get-order.js +++ b/packages/medusa/src/api/routes/admin/orders/get-order.js @@ -1,5 +1,24 @@ import { defaultRelations, defaultFields } from "./" +/** + * @oas [get] /orders/{id} + * operationId: "GetOrdersOrder" + * summary: "Retrieve an Order" + * description: "Retrieves an Order" + * parameters: + * - (path) id=* {string} The id of the Order. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/list-orders.js b/packages/medusa/src/api/routes/admin/orders/list-orders.js index d76b9fb2e0..88512dad55 100644 --- a/packages/medusa/src/api/routes/admin/orders/list-orders.js +++ b/packages/medusa/src/api/routes/admin/orders/list-orders.js @@ -1,6 +1,23 @@ import _ from "lodash" import { Not } from "typeorm" import { defaultRelations, defaultFields } from "./" +/** + * @oas [get] /orders + * operationId: "GetOrders" + * summary: "List Orders" + * description: "Retrieves an list of Orders" + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { try { diff --git a/packages/medusa/src/api/routes/admin/orders/process-swap-payment.js b/packages/medusa/src/api/routes/admin/orders/process-swap-payment.js index 72ff23f87f..05252ea3cb 100644 --- a/packages/medusa/src/api/routes/admin/orders/process-swap-payment.js +++ b/packages/medusa/src/api/routes/admin/orders/process-swap-payment.js @@ -1,4 +1,25 @@ import { defaultFields, defaultRelations } from "./" + +/** + * @oas [post] /orders/{id}/swaps/{swap_id}/process-payment + * operationId: "PostOrdersOrderSwapsSwapProcessPayment" + * summary: "Process a Swap difference" + * description: "When there are differences between the returned and shipped Products in a Swap, the difference must be processed. Either a Refund will be issued or a Payment will be captured." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) swap_id=* {string} The id of the Swap. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, swap_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/receive-return.js b/packages/medusa/src/api/routes/admin/orders/receive-return.js index 780bfdfa05..b475137057 100644 --- a/packages/medusa/src/api/routes/admin/orders/receive-return.js +++ b/packages/medusa/src/api/routes/admin/orders/receive-return.js @@ -1,6 +1,45 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/returns/{return_id}/receive + * operationId: "PostOrdersOrderReturnsReturnReceive" + * summary: "Receive a Return" + * description: "Registers a Return as received." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) return_id=* {string} The id of the Return. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * items: + * description: The Line Items that have been received. + * type: array + * items: + * properties: + * item_id: + * description: The id of the Line Item. + * type: string + * quantity: + * description: The quantity of the Line Item. + * type: integer + * refund: + * description: The amount to refund. + * type: integer + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, return_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/receive-swap.js b/packages/medusa/src/api/routes/admin/orders/receive-swap.js index 7911b20a1f..623e9bdd97 100644 --- a/packages/medusa/src/api/routes/admin/orders/receive-swap.js +++ b/packages/medusa/src/api/routes/admin/orders/receive-swap.js @@ -1,6 +1,42 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /orders/{id}/swaps/{swap_id}/receive + * operationId: "PostOrdersOrderSwapsSwapReceive" + * summary: "Receive a Swap" + * description: "Registers a Swap as received." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) swap_id=* {string} The id of the Swap. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * items: + * description: The Line Items that have been received. + * type: array + * items: + * properties: + * item_id: + * description: The id of the Line Item. + * type: string + * quantity: + * description: The quantity of the Line Item. + * type: integer + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, swap_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/refund-payment.js b/packages/medusa/src/api/routes/admin/orders/refund-payment.js index d5ae26dffe..c4629e0987 100644 --- a/packages/medusa/src/api/routes/admin/orders/refund-payment.js +++ b/packages/medusa/src/api/routes/admin/orders/refund-payment.js @@ -1,6 +1,42 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/refunds + * operationId: "PostOrdersOrderRefunds" + * summary: "Create a Refund" + * description: "Issues a Refund." + * parameters: + * - (path) id=* {string} The id of the Order. + * requestBody: + * content: + * application/json: + * schema: + * required: + * - amount + * - reason + * properties: + * amount: + * description: The amount to refund. + * type: integer + * reason: + * description: The reason for the Refund. + * type: string + * note: + * description: A not with additional details about the Refund. + * type: string + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/orders/request-return.js b/packages/medusa/src/api/routes/admin/orders/request-return.js index 69a323ed27..187dd31600 100644 --- a/packages/medusa/src/api/routes/admin/orders/request-return.js +++ b/packages/medusa/src/api/routes/admin/orders/request-return.js @@ -1,6 +1,57 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /orders/{id}/returns + * operationId: "PostOrdersOrderReturns" + * summary: "Request a Return" + * description: "Requests a Return. If applicable a return label will be created and other plugins notified." + * parameters: + * - (path) id=* {string} The id of the Order. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * items: + * description: The Line Items that will be returned. + * type: array + * items: + * properties: + * item_id: + * description: The id of the Line Item. + * type: string + * quantity: + * description: The quantity of the Line Item. + * type: integer + * return_shipping: + * description: The Shipping Method to be used to handle the return shipment. + * type: object + * properties: + * option_id: + * type: string + * description: The id of the Shipping Option to create the Shipping Method from. + * price: + * type: integer + * description: The price to charge for the Shipping Method. + * receive_now: + * description: A flag to indicate if the Return should be registerd as received immediately. + * type: boolean + * refund: + * description: The amount to refund. + * type: integer + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/orders/update-claim.js b/packages/medusa/src/api/routes/admin/orders/update-claim.js index cd3421e6dd..ffbd4eae46 100644 --- a/packages/medusa/src/api/routes/admin/orders/update-claim.js +++ b/packages/medusa/src/api/routes/admin/orders/update-claim.js @@ -1,6 +1,82 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /order/{id}/claims/{claim_id} + * operationId: "PostOrdersOrderClaimsClaim" + * summary: "Update a Claim" + * description: "Updates a Claim." + * parameters: + * - (path) id=* {string} The id of the Order. + * - (path) claim_id=* {string} The id of the Claim. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * claim_items: + * description: The Claim Items that the Claim will consist of. + * type: array + * items: + * properties: + * id: + * description: The id of the Claim Item. + * type: string + * item_id: + * description: The id of the Line Item that will be claimed. + * type: string + * quantity: + * description: The number of items that will be returned + * type: integer + * note: + * description: Short text describing the Claim Item in further detail. + * type: string + * reason: + * description: The reason for the Claim + * type: string + * enum: + * - missing_item + * - wrong_item + * - production_failure + * - other + * tags: + * description: A list o tags to add to the Claim Item + * type: array + * items: + * type: string + * images: + * description: A list of image URL's that will be associated with the Claim + * items: + * type: string + * shipping_methods: + * description: The Shipping Methods to send the additional Line Items with. + * type: array + * items: + * properties: + * id: + * description: The id of an existing Shipping Method + * type: string + * option_id: + * description: The id of the Shipping Option to create a Shipping Method from + * type: string + * price: + * description: The price to charge for the Shipping Method + * type: integer + * metadata: + * description: An optional set of key-value pairs to hold additional information. + * type: object + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id, claim_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/add-option.js b/packages/medusa/src/api/routes/admin/products/add-option.js index ab9cc1049a..c7f9e5291c 100644 --- a/packages/medusa/src/api/routes/admin/products/add-option.js +++ b/packages/medusa/src/api/routes/admin/products/add-option.js @@ -1,6 +1,33 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /products/{id}/options + * operationId: "PostProductsProductOptions" + * summary: "Add an Option" + * description: "Adds a Product Option to a Product" + * parameters: + * - (path) id=* {string} The id of the Product. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * title: + * description: "The title the Product Option will be identified by i.e. \"Size\"" + * type: string + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/create-product.js b/packages/medusa/src/api/routes/admin/products/create-product.js index 86ee3c74bd..16f046c98d 100644 --- a/packages/medusa/src/api/routes/admin/products/create-product.js +++ b/packages/medusa/src/api/routes/admin/products/create-product.js @@ -1,6 +1,183 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "." +/** + * @oas [post] /products + * operationId: "PostProducts" + * summary: "Create a Product" + * description: "Creates a Product" + * requestBody: + * content: + * application/json: + * schema: + * properties: + * title: + * description: "The title of the Product" + * type: string + * subtitle: + * description: "The subtitle of the Product" + * type: string + * description: + * description: "A description of the Product." + * type: string + * is_giftcard: + * description: A flag to indicate if the Product represents a Gift Card. Purchasing Products with this flag set to `true` will result in a Gift Card being created. + * type: boolean + * images: + * description: Images of the Product. + * type: array + * items: + * type: string + * thumbnail: + * description: The thumbnail to use for the Product. + * type: string + * handle: + * description: A unique handle to identify the Product by. + * type: string + * type: + * description: The Product Type to associate the Product with. + * type: object + * properties: + * value: + * description: The value of the Product Type. + * type: string + * collection_id: + * description: The id of the Collection the Product should belong to. + * type: string + * tags: + * description: Tags to associate the Product with. + * type: array + * items: + * properties: + * id: + * description: The id of an existing Tag. + * type: string + * value: + * description: The value of the Tag, these will be upserted. + * type: string + * options: + * description: The Options that the Product should have. These define on which properties the Product's Product Variants will differ. + * type: array + * items: + * properties: + * title: + * description: The title to identify the Product Option by. + * type: string + * variants: + * description: A list of Product Variants to create with the Product. + * type: array + * items: + * properties: + * title: + * description: The title to identify the Product Variant by. + * type: string + * sku: + * description: The unique SKU for the Product Variant. + * type: string + * ean: + * description: The EAN number of the item. + * type: string + * upc: + * description: The UPC number of the item. + * type: string + * barcode: + * description: A generic GTIN field for the Product Variant. + * type: string + * hs_code: + * description: The Harmonized System code for the Product Variant. + * type: string + * inventory_quantity: + * description: The amount of stock kept for the Product Variant. + * type: integer + * allow_backorder: + * description: Whether the Product Variant can be purchased when out of stock. + * type: boolean + * manage_inventory: + * description: Whether Medusa should keep track of the inventory for this Product Variant. + * type: boolean + * weight: + * description: The wieght of the Product Variant. + * type: string + * length: + * description: The length of the Product Variant. + * type: string + * height: + * description: The height of the Product Variant. + * type: string + * width: + * description: The width of the Product Variant. + * type: string + * origin_country: + * description: The country of origin of the Product Variant. + * type: string + * mid_code: + * description: The Manufacturer Identification code for the Product Variant. + * type: string + * material: + * description: The material composition of the Product Variant. + * type: string + * metadata: + * description: An optional set of key-value pairs with additional information. + * type: object + * prices: + * type: array + * items: + * properties: + * region_id: + * description: The id of the Region for which the price is used. + * type: string + * currency_code: + * description: The 3 character ISO currency code for which the price will be used. + * type: string + * amount: + * description: The amount to charge for the Product Variant. + * type: integer + * sale_amount: + * description: The sale amount to charge for the Product Variant. + * type: integer + * options: + * type: array + * items: + * properties: + * value: + * description: The value to give for the Product Option at the same index in the Product's `options` field. + * type: string + * weight: + * description: The wieght of the Product. + * type: string + * length: + * description: The length of the Product. + * type: string + * height: + * description: The height of the Product. + * type: string + * width: + * description: The width of the Product. + * type: string + * origin_country: + * description: The country of origin of the Product. + * type: string + * mid_code: + * description: The Manufacturer Identification code for the Product. + * type: string + * material: + * description: The material composition of the Product. + * type: string + * metadata: + * description: An optional set of key-value pairs with additional information. + * type: object + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const schema = Validator.object().keys({ title: Validator.string().required(), diff --git a/packages/medusa/src/api/routes/admin/products/create-variant.js b/packages/medusa/src/api/routes/admin/products/create-variant.js index bf1e3a05ae..804f40ac7d 100644 --- a/packages/medusa/src/api/routes/admin/products/create-variant.js +++ b/packages/medusa/src/api/routes/admin/products/create-variant.js @@ -1,6 +1,107 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /products/{id}/variants + * operationId: "PostProductsProductVariants" + * summary: "Create a Product Variant" + * description: "Creates a Product Variant. Each Product Variant must have a unique combination of Product Option Values." + * parameters: + * - (path) id=* {string} The id of the Product. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * title: + * description: The title to identify the Product Variant by. + * type: string + * sku: + * description: The unique SKU for the Product Variant. + * type: string + * ean: + * description: The EAN number of the item. + * type: string + * upc: + * description: The UPC number of the item. + * type: string + * barcode: + * description: A generic GTIN field for the Product Variant. + * type: string + * hs_code: + * description: The Harmonized System code for the Product Variant. + * type: string + * inventory_quantity: + * description: The amount of stock kept for the Product Variant. + * type: integer + * allow_backorder: + * description: Whether the Product Variant can be purchased when out of stock. + * type: boolean + * manage_inventory: + * description: Whether Medusa should keep track of the inventory for this Product Variant. + * type: boolean + * weight: + * description: The wieght of the Product Variant. + * type: string + * length: + * description: The length of the Product Variant. + * type: string + * height: + * description: The height of the Product Variant. + * type: string + * width: + * description: The width of the Product Variant. + * type: string + * origin_country: + * description: The country of origin of the Product Variant. + * type: string + * mid_code: + * description: The Manufacturer Identification code for the Product Variant. + * type: string + * material: + * description: The material composition of the Product Variant. + * type: string + * metadata: + * description: An optional set of key-value pairs with additional information. + * type: object + * prices: + * type: array + * items: + * properties: + * region_id: + * description: The id of the Region for which the price is used. + * type: string + * currency_code: + * description: The 3 character ISO currency code for which the price will be used. + * type: string + * amount: + * description: The amount to charge for the Product Variant. + * type: integer + * sale_amount: + * description: The sale amount to charge for the Product Variant. + * type: integer + * options: + * type: array + * items: + * properties: + * option_id: + * description: The id of the Product Option to set the value for. + * type: string + * value: + * description: The value to give for the Product Option. + * type: string + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/delete-option.js b/packages/medusa/src/api/routes/admin/products/delete-option.js index e869a4ca96..8b8911713e 100644 --- a/packages/medusa/src/api/routes/admin/products/delete-option.js +++ b/packages/medusa/src/api/routes/admin/products/delete-option.js @@ -1,5 +1,33 @@ import { defaultRelations, defaultFields } from "." +/** + * @oas [delete] /products/{id}/options/{option_id} + * operationId: "DeleteProductsProductOptionsOption" + * summary: "Delete a Product Option" + * description: "Deletes a Product Option. Before a Product Option can be deleted all Option Values for the Product Option must be the same. You may, for example, have to delete some of your variants prior to deleting the Product Option" + * parameters: + * - (path) id=* {string} The id of the Product. + * - (path) option_id=* {string} The id of the Product Option. + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Product Option + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id, option_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/delete-product.js b/packages/medusa/src/api/routes/admin/products/delete-product.js index 975f6b26fd..a09b99273d 100644 --- a/packages/medusa/src/api/routes/admin/products/delete-product.js +++ b/packages/medusa/src/api/routes/admin/products/delete-product.js @@ -1,3 +1,28 @@ +/** + * @oas [delete] /products/{id} + * operationId: "DeleteProductsProduct" + * summary: "Delete a Product" + * description: "Deletes a Product and it's associated Product Variants." + * parameters: + * - (path) id=* {string} The id of the Product. + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Product. + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/delete-variant.js b/packages/medusa/src/api/routes/admin/products/delete-variant.js index c91cb978d9..0381c85f5a 100644 --- a/packages/medusa/src/api/routes/admin/products/delete-variant.js +++ b/packages/medusa/src/api/routes/admin/products/delete-variant.js @@ -1,4 +1,31 @@ import { defaultRelations, defaultFields } from "." + +/** + * @oas [delete] /products/{id}/variants/{variant_id} + * operationId: "DeleteProductsProductVariantsVariant" + * summary: "Delete a Product Variant" + * description: "Deletes a Product Variant." + * parameters: + * - (path) id=* {string} The id of the Product. + * - (path) variant_id=* {string} The id of the Product Variant. + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Product Variant. + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { id, variant_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/get-product.js b/packages/medusa/src/api/routes/admin/products/get-product.js index 77daff520d..4dcb6f589e 100644 --- a/packages/medusa/src/api/routes/admin/products/get-product.js +++ b/packages/medusa/src/api/routes/admin/products/get-product.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /products/{id} + * operationId: "GetProductsProduct" + * summary: "Retrieve a Product" + * description: "Retrieves a Product." + * parameters: + * - (path) id=* {string} The id of the Product. + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/get-variants.js b/packages/medusa/src/api/routes/admin/products/get-variants.js index f37032cba5..09fc7273e6 100644 --- a/packages/medusa/src/api/routes/admin/products/get-variants.js +++ b/packages/medusa/src/api/routes/admin/products/get-variants.js @@ -1,3 +1,24 @@ +/** + * @oas [get] /products/{id}/variants + * operationId: "GetProductsProductVariants" + * summary: "List a Product's Product Variants" + * description: "Retrieves a list of the Product Variants associated with a Product." + * parameters: + * - (path) id=* {string} The id of the Product. + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * variants: + * type: array + * items: + * $ref: "#/components/schemas/product_variant" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/list-products.js b/packages/medusa/src/api/routes/admin/products/list-products.js index a1aa7b9982..8c0ab5207d 100644 --- a/packages/medusa/src/api/routes/admin/products/list-products.js +++ b/packages/medusa/src/api/routes/admin/products/list-products.js @@ -1,6 +1,34 @@ import _ from "lodash" import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /products + * operationId: "GetProducts" + * summary: "List Product" + * description: "Retrieves a list of Product" + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * count: + * description: The number of Products. + * type: integer + * offset: + * description: The offset of the Product query. + * type: integer + * limit: + * description: The limit of the Product query. + * type: integer + * products: + * type: array + * items: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { try { const productService = req.scope.resolve("productService") diff --git a/packages/medusa/src/api/routes/admin/products/list-types.js b/packages/medusa/src/api/routes/admin/products/list-types.js index 0020c9e07c..d1d3b78f59 100644 --- a/packages/medusa/src/api/routes/admin/products/list-types.js +++ b/packages/medusa/src/api/routes/admin/products/list-types.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /products/types + * operationId: "GetProductsTypes" + * summary: "List Product Types" + * description: "Retrieves a list of Product Types." + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * types: + * type: array + * items: + * $ref: "#/components/schemas/product_type" + */ export default async (req, res) => { try { const productService = req.scope.resolve("productService") diff --git a/packages/medusa/src/api/routes/admin/products/update-option.js b/packages/medusa/src/api/routes/admin/products/update-option.js index 232f31ea74..ecd7e3aa2b 100644 --- a/packages/medusa/src/api/routes/admin/products/update-option.js +++ b/packages/medusa/src/api/routes/admin/products/update-option.js @@ -1,6 +1,34 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /products/{id}/options/{option_id} + * operationId: "PostProductsProductOptionsOption" + * summary: "Update a Product Option." + * description: "Updates a Product Option" + * parameters: + * - (path) id=* {string} The id of the Product. + * - (path) option_id=* {string} The id of the Product Option. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * title: + * description: "The title of the Product Option" + * type: string + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id, option_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/update-product.js b/packages/medusa/src/api/routes/admin/products/update-product.js index ecb614cc12..a59d231538 100644 --- a/packages/medusa/src/api/routes/admin/products/update-product.js +++ b/packages/medusa/src/api/routes/admin/products/update-product.js @@ -1,6 +1,185 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "." +/** + * @oas [post] /products/{id} + * operationId: "PostProductsProduct" + * summary: "Update a Product" + * description: "Updates a Product" + * parameters: + * - (path) id=* {string} The id of the Product. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * title: + * description: "The title of the Product" + * type: string + * subtitle: + * description: "The subtitle of the Product" + * type: string + * description: + * description: "A description of the Product." + * type: string + * is_giftcard: + * description: A flag to indicate if the Product represents a Gift Card. Purchasing Products with this flag set to `true` will result in a Gift Card being created. + * type: boolean + * images: + * description: Images of the Product. + * type: array + * items: + * type: string + * thumbnail: + * description: The thumbnail to use for the Product. + * type: string + * handle: + * description: A unique handle to identify the Product by. + * type: string + * type: + * description: The Product Type to associate the Product with. + * type: object + * properties: + * value: + * description: The value of the Product Type. + * type: string + * collection_id: + * description: The id of the Collection the Product should belong to. + * type: string + * tags: + * description: Tags to associate the Product with. + * type: array + * items: + * properties: + * id: + * description: The id of an existing Tag. + * type: string + * value: + * description: The value of the Tag, these will be upserted. + * type: string + * options: + * description: The Options that the Product should have. These define on which properties the Product's Product Variants will differ. + * type: array + * items: + * properties: + * title: + * description: The title to identify the Product Option by. + * type: string + * variants: + * description: A list of Product Variants to create with the Product. + * type: array + * items: + * properties: + * title: + * description: The title to identify the Product Variant by. + * type: string + * sku: + * description: The unique SKU for the Product Variant. + * type: string + * ean: + * description: The EAN number of the item. + * type: string + * upc: + * description: The UPC number of the item. + * type: string + * barcode: + * description: A generic GTIN field for the Product Variant. + * type: string + * hs_code: + * description: The Harmonized System code for the Product Variant. + * type: string + * inventory_quantity: + * description: The amount of stock kept for the Product Variant. + * type: integer + * allow_backorder: + * description: Whether the Product Variant can be purchased when out of stock. + * type: boolean + * manage_inventory: + * description: Whether Medusa should keep track of the inventory for this Product Variant. + * type: boolean + * weight: + * description: The wieght of the Product Variant. + * type: string + * length: + * description: The length of the Product Variant. + * type: string + * height: + * description: The height of the Product Variant. + * type: string + * width: + * description: The width of the Product Variant. + * type: string + * origin_country: + * description: The country of origin of the Product Variant. + * type: string + * mid_code: + * description: The Manufacturer Identification code for the Product Variant. + * type: string + * material: + * description: The material composition of the Product Variant. + * type: string + * metadata: + * description: An optional set of key-value pairs with additional information. + * type: object + * prices: + * type: array + * items: + * properties: + * region_id: + * description: The id of the Region for which the price is used. + * type: string + * currency_code: + * description: The 3 character ISO currency code for which the price will be used. + * type: string + * amount: + * description: The amount to charge for the Product Variant. + * type: integer + * sale_amount: + * description: The sale amount to charge for the Product Variant. + * type: integer + * options: + * type: array + * items: + * properties: + * value: + * description: The value to give for the Product Option at the same index in the Product's `options` field. + * type: string + * weight: + * description: The wieght of the Product. + * type: string + * length: + * description: The length of the Product. + * type: string + * height: + * description: The height of the Product. + * type: string + * width: + * description: The width of the Product. + * type: string + * origin_country: + * description: The country of origin of the Product. + * type: string + * mid_code: + * description: The Manufacturer Identification code for the Product. + * type: string + * material: + * description: The material composition of the Product. + * type: string + * metadata: + * description: An optional set of key-value pairs with additional information. + * type: object + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/admin/products/update-variant.js b/packages/medusa/src/api/routes/admin/products/update-variant.js index dbb7e41453..d7973a6e73 100644 --- a/packages/medusa/src/api/routes/admin/products/update-variant.js +++ b/packages/medusa/src/api/routes/admin/products/update-variant.js @@ -2,6 +2,108 @@ import _ from "lodash" import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /products/{id}/variants/{variant_id} + * operationId: "PostProductsProductVariantsVariant" + * summary: "Update a Product Variant" + * description: "Update a Product Variant." + * parameters: + * - (path) id=* {string} The id of the Product. + * - (path) variant_id=* {string} The id of the Product Variant. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * title: + * description: The title to identify the Product Variant by. + * type: string + * sku: + * description: The unique SKU for the Product Variant. + * type: string + * ean: + * description: The EAN number of the item. + * type: string + * upc: + * description: The UPC number of the item. + * type: string + * barcode: + * description: A generic GTIN field for the Product Variant. + * type: string + * hs_code: + * description: The Harmonized System code for the Product Variant. + * type: string + * inventory_quantity: + * description: The amount of stock kept for the Product Variant. + * type: integer + * allow_backorder: + * description: Whether the Product Variant can be purchased when out of stock. + * type: boolean + * manage_inventory: + * description: Whether Medusa should keep track of the inventory for this Product Variant. + * type: boolean + * weight: + * description: The wieght of the Product Variant. + * type: string + * length: + * description: The length of the Product Variant. + * type: string + * height: + * description: The height of the Product Variant. + * type: string + * width: + * description: The width of the Product Variant. + * type: string + * origin_country: + * description: The country of origin of the Product Variant. + * type: string + * mid_code: + * description: The Manufacturer Identification code for the Product Variant. + * type: string + * material: + * description: The material composition of the Product Variant. + * type: string + * metadata: + * description: An optional set of key-value pairs with additional information. + * type: object + * prices: + * type: array + * items: + * properties: + * region_id: + * description: The id of the Region for which the price is used. + * type: string + * currency_code: + * description: The 3 character ISO currency code for which the price will be used. + * type: string + * amount: + * description: The amount to charge for the Product Variant. + * type: integer + * sale_amount: + * description: The sale amount to charge for the Product Variant. + * type: integer + * options: + * type: array + * items: + * properties: + * option_id: + * description: The id of the Product Option to set the value for. + * type: string + * value: + * description: The value to give for the Product Option. + * type: string + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id, variant_id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/regions/add-country.js b/packages/medusa/src/api/routes/admin/regions/add-country.js index e4d2caf6bf..ad0e8a15e1 100644 --- a/packages/medusa/src/api/routes/admin/regions/add-country.js +++ b/packages/medusa/src/api/routes/admin/regions/add-country.js @@ -1,6 +1,33 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /regions/{id}/countries + * operationId: "PostRegionsRegionCountries" + * summary: "Add Country" + * description: "Adds a Country to the list of Countries in a Region" + * parameters: + * - (path) id=* {string} The id of the Region. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * country_code: + * description: "The 2 character ISO code for the Country." + * type: string + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/regions/add-fulfillment-provider.js b/packages/medusa/src/api/routes/admin/regions/add-fulfillment-provider.js index 4d2529c281..09f618e9a1 100644 --- a/packages/medusa/src/api/routes/admin/regions/add-fulfillment-provider.js +++ b/packages/medusa/src/api/routes/admin/regions/add-fulfillment-provider.js @@ -1,6 +1,33 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /regions/{id}/fulfillment-providers + * operationId: "PostRegionsRegionFulfillmentProviders" + * summary: "Add Fulfillment Provider" + * description: "Adds a Fulfillment Provider to a Region" + * parameters: + * - (path) id=* {string} The id of the Region. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * provider_id: + * description: "The id of the Fulfillment Provider to add." + * type: string + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/regions/add-payment-provider.js b/packages/medusa/src/api/routes/admin/regions/add-payment-provider.js index b522a4ff32..424ec645b2 100644 --- a/packages/medusa/src/api/routes/admin/regions/add-payment-provider.js +++ b/packages/medusa/src/api/routes/admin/regions/add-payment-provider.js @@ -1,6 +1,33 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /regions/{id}/payment-providers + * operationId: "PostRegionsRegionPaymentProviders" + * summary: "Add Payment Provider" + * description: "Adds a Payment Provider to a Region" + * parameters: + * - (path) id=* {string} The id of the Region. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * provider_id: + * description: "The id of the Payment Provider to add." + * type: string + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/regions/create-region.js b/packages/medusa/src/api/routes/admin/regions/create-region.js index a1a9b6c8f5..4c29350434 100644 --- a/packages/medusa/src/api/routes/admin/regions/create-region.js +++ b/packages/medusa/src/api/routes/admin/regions/create-region.js @@ -1,6 +1,55 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /regions + * operationId: "PostRegions" + * summary: "Create a Region" + * description: "Creates a Region" + * requestBody: + * content: + * application/json: + * schema: + * properties: + * name: + * description: "The name of the Region" + * type: string + * currency_code: + * description: "The 3 character ISO currency code to use for the Region." + * type: string + * tax_code: + * description: "An optional tax code the Region." + * type: string + * tax_rate: + * description: "The tax rate to use on Orders in the Region." + * type: number + * payment_providers: + * description: "A list of Payment Providers that should be enabled for the Region" + * type: array + * items: + * type: string + * fulfillment_providers: + * description: "A list of Fulfillment Providers that should be enabled for the Region" + * type: array + * items: + * type: string + * countries: + * description: "A list of countries that should be included in the Region." + * type: array + * items: + * type: string + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const schema = Validator.object().keys({ name: Validator.string().required(), diff --git a/packages/medusa/src/api/routes/admin/regions/delete-metadata.js b/packages/medusa/src/api/routes/admin/regions/delete-metadata.js index 87fd62cbd8..b029c6820b 100644 --- a/packages/medusa/src/api/routes/admin/regions/delete-metadata.js +++ b/packages/medusa/src/api/routes/admin/regions/delete-metadata.js @@ -1,5 +1,25 @@ import { defaultRelations, defaultFields } from "./" +/** + * @oas [delete] /regions/{id}/metadata/{key} + * operationId: "DeleteRegionsRegionMetadataKey" + * summary: "Delete Metadata" + * description: "Deletes a metadata key." + * parameters: + * - (path) id=* {string} The id of the Region. + * - (path) key=* {string} The metadata key. + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { id, key } = req.params diff --git a/packages/medusa/src/api/routes/admin/regions/delete-region.js b/packages/medusa/src/api/routes/admin/regions/delete-region.js index 9879d23e85..d15f01d823 100644 --- a/packages/medusa/src/api/routes/admin/regions/delete-region.js +++ b/packages/medusa/src/api/routes/admin/regions/delete-region.js @@ -1,5 +1,30 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [delete] /regions/{id} + * operationId: "DeleteRegionsRegion" + * summary: "Delete a Region" + * description: "Deletes a Region." + * parameters: + * - (path) id=* {string} The id of the Region. + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Region. + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { region_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/regions/get-fulfillment-options.js b/packages/medusa/src/api/routes/admin/regions/get-fulfillment-options.js index 9dba5d8b67..ea0aeac4e1 100644 --- a/packages/medusa/src/api/routes/admin/regions/get-fulfillment-options.js +++ b/packages/medusa/src/api/routes/admin/regions/get-fulfillment-options.js @@ -1,3 +1,24 @@ +/** + * @oas [get] /regions/{id}/fulfillment-options + * operationId: "GetRegionsRegionFulfillmentOptions" + * summary: "List Fulfillment Options available in the Region" + * description: "Gathers all the fulfillment options available to in the Region." + * parameters: + * - (path) id=* {string} The id of the Region. + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * fulfillment_options: + * type: array + * items: + * type: object + */ export default async (req, res) => { const { region_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/regions/get-region.js b/packages/medusa/src/api/routes/admin/regions/get-region.js index 56ee0c1f9c..14b78ccb79 100644 --- a/packages/medusa/src/api/routes/admin/regions/get-region.js +++ b/packages/medusa/src/api/routes/admin/regions/get-region.js @@ -1,6 +1,25 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [get] /regions/{id} + * operationId: "GetRegionsRegion" + * summary: "Retrieve a Region" + * description: "Retrieves a Region." + * parameters: + * - (path) id=* {string} The id of the Region. + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/regions/list-regions.js b/packages/medusa/src/api/routes/admin/regions/list-regions.js index b09de83221..c1369f6aca 100644 --- a/packages/medusa/src/api/routes/admin/regions/list-regions.js +++ b/packages/medusa/src/api/routes/admin/regions/list-regions.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /regions + * operationId: "GetRegions" + * summary: "List Regions" + * description: "Retrieves a list of Regions." + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * regions: + * type: array + * items: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { try { const regionService = req.scope.resolve("regionService") diff --git a/packages/medusa/src/api/routes/admin/regions/remove-country.js b/packages/medusa/src/api/routes/admin/regions/remove-country.js index b56ff7b362..9c132666a5 100644 --- a/packages/medusa/src/api/routes/admin/regions/remove-country.js +++ b/packages/medusa/src/api/routes/admin/regions/remove-country.js @@ -1,6 +1,26 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [delete] /regions/{id}/countries/{country_code} + * operationId: "PostRegionsRegionCountriesCountry" + * summary: "Remove Country" + * description: "Removes a Country from the list of Countries in a Region" + * parameters: + * - (path) id=* {string} The id of the Region. + * - (path) country_code=* {string} The 2 character ISO code for the Country. + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id, country_code } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/regions/remove-fulfillment-provider.js b/packages/medusa/src/api/routes/admin/regions/remove-fulfillment-provider.js index 19db7d94f0..9e28f89a09 100644 --- a/packages/medusa/src/api/routes/admin/regions/remove-fulfillment-provider.js +++ b/packages/medusa/src/api/routes/admin/regions/remove-fulfillment-provider.js @@ -1,6 +1,26 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [delete] /regions/{id}/fulfillment-providers/{provider_id} + * operationId: "PostRegionsRegionFulfillmentProvidersProvider" + * summary: "Remove Fulfillment Provider" + * description: "Removes a Fulfillment Provider." + * parameters: + * - (path) id=* {string} The id of the Region. + * - (path) provider_id=* {string} The id of the Fulfillment Provider. + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id, provider_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/regions/remove-payment-provider.js b/packages/medusa/src/api/routes/admin/regions/remove-payment-provider.js index 906cefceab..4c029e8965 100644 --- a/packages/medusa/src/api/routes/admin/regions/remove-payment-provider.js +++ b/packages/medusa/src/api/routes/admin/regions/remove-payment-provider.js @@ -1,6 +1,26 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [delete] /regions/{id}/payment-providers/{provider_id} + * operationId: "PostRegionsRegionPaymentProvidersProvider" + * summary: "Remove Payment Provider" + * description: "Removes a Payment Provider." + * parameters: + * - (path) id=* {string} The id of the Region. + * - (path) provider_id=* {string} The id of the Payment Provider. + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id, provider_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/regions/update-region.js b/packages/medusa/src/api/routes/admin/regions/update-region.js index 0199db5167..f0d39dfd0d 100644 --- a/packages/medusa/src/api/routes/admin/regions/update-region.js +++ b/packages/medusa/src/api/routes/admin/regions/update-region.js @@ -1,6 +1,57 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /regions/{id} + * operationId: "PostRegionsRegion" + * summary: "Update a Region" + * description: "Updates a Region" + * parameters: + * - (path) id=* {string} The id of the Region. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * name: + * description: "The name of the Region" + * type: string + * currency_code: + * description: "The 3 character ISO currency code to use for the Region." + * type: string + * tax_code: + * description: "An optional tax code the Region." + * type: string + * tax_rate: + * description: "The tax rate to use on Orders in the Region." + * type: number + * payment_providers: + * description: "A list of Payment Providers that should be enabled for the Region" + * type: array + * items: + * type: string + * fulfillment_providers: + * description: "A list of Fulfillment Providers that should be enabled for the Region" + * type: array + * items: + * type: string + * countries: + * description: "A list of countries that should be included in the Region." + * type: array + * items: + * type: string + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/returns/list-returns.js b/packages/medusa/src/api/routes/admin/returns/list-returns.js index 65cd1f99ed..abda612d0b 100644 --- a/packages/medusa/src/api/routes/admin/returns/list-returns.js +++ b/packages/medusa/src/api/routes/admin/returns/list-returns.js @@ -1,5 +1,24 @@ import _ from "lodash" +/** + * @oas [get] /returns + * operationId: "GetReturns" + * summary: "List Returns" + * description: "Retrieves a list of Returns" + * tags: + * - Return + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * returns: + * type: array + * items: + * $ref: "#/components/schemas/return" + */ export default async (req, res) => { try { const returnService = req.scope.resolve("returnService") diff --git a/packages/medusa/src/api/routes/admin/shipping-options/create-shipping-option.js b/packages/medusa/src/api/routes/admin/shipping-options/create-shipping-option.js index dc1034a6ce..52ed29a25b 100644 --- a/packages/medusa/src/api/routes/admin/shipping-options/create-shipping-option.js +++ b/packages/medusa/src/api/routes/admin/shipping-options/create-shipping-option.js @@ -1,6 +1,69 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /shipping-options + * operationId: "PostShippingOptions" + * summary: "Create Shipping Option" + * description: "Creates a Shipping Option" + * requestBody: + * content: + * application/json: + * schema: + * properties: + * name: + * description: "The name of the Shipping Option" + * type: string + * region_id: + * description: "The id of the Region in which the Shipping Option will be available." + * type: string + * provider_id: + * description: "The id of the Fulfillment Provider that handles the Shipping Option." + * type: string + * profile_id: + * description: "The id of the Shipping Profile to add the Shipping Option to." + * type: number + * data: + * description: "The data needed for the Fulfillment Provider to handle shipping with this Shipping Option." + * type: object + * price_type: + * description: "The type of the Shipping Option price." + * type: string + * enum: + * - flat_rate + * - calculated + * amount: + * description: "The amount to charge for the Shipping Option." + * type: integer + * requirements: + * description: "The requirements that must be satisfied for the Shipping Option to be available." + * type: array + * items: + * properties: + * type: + * description: The type of the requirement + * type: string + * enum: + * - max_subtotal + * - min_subtotal + * amount: + * description: The amount to compare with. + * type: integer + * is_return: + * description: Whether the Shipping Option defines a return shipment. + * type: boolean + * tags: + * - Shipping Option + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_option: + * $ref: "#/components/schemas/shipping_option" + */ export default async (req, res) => { const schema = Validator.object().keys({ name: Validator.string().required(), diff --git a/packages/medusa/src/api/routes/admin/shipping-options/delete-shipping-option.js b/packages/medusa/src/api/routes/admin/shipping-options/delete-shipping-option.js index 3be84f4e18..9e3ae7d89b 100644 --- a/packages/medusa/src/api/routes/admin/shipping-options/delete-shipping-option.js +++ b/packages/medusa/src/api/routes/admin/shipping-options/delete-shipping-option.js @@ -1,3 +1,28 @@ +/** + * @oas [delete] /shipping-options/{id} + * operationId: "DeleteShippingOptionsOption" + * summary: "Delete a Shipping Option" + * description: "Deletes a Shipping Option." + * parameters: + * - (path) id=* {string} The id of the Shipping Option. + * tags: + * - Shipping Option + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Shipping Option. + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { option_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/shipping-options/get-shipping-option.js b/packages/medusa/src/api/routes/admin/shipping-options/get-shipping-option.js index 665a5b7119..44bdddd993 100644 --- a/packages/medusa/src/api/routes/admin/shipping-options/get-shipping-option.js +++ b/packages/medusa/src/api/routes/admin/shipping-options/get-shipping-option.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /shipping-options/{id} + * operationId: "GetShippingOptionsOption" + * summary: "Retrieve a Shipping Option" + * description: "Retrieves a Shipping Option." + * parameters: + * - (path) id=* {string} The id of the Shipping Option. + * tags: + * - Shipping Option + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_option: + * $ref: "#/components/schemas/shipping_option" + */ export default async (req, res) => { const { option_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/shipping-options/list-shipping-options.js b/packages/medusa/src/api/routes/admin/shipping-options/list-shipping-options.js index e6f6bbabfa..5fa7f3e451 100644 --- a/packages/medusa/src/api/routes/admin/shipping-options/list-shipping-options.js +++ b/packages/medusa/src/api/routes/admin/shipping-options/list-shipping-options.js @@ -1,6 +1,25 @@ import _ from "lodash" import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /shipping-options + * operationId: "GetShippingOptions" + * summary: "List Shipping Options" + * description: "Retrieves a list of Shipping Options." + * tags: + * - Shipping Option + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_options: + * type: array + * items: + * $ref: "#/components/schemas/shipping_option" + */ export default async (req, res) => { try { const query = _.pick(req.query, ["region_id", "is_return"]) diff --git a/packages/medusa/src/api/routes/admin/shipping-options/update-shipping-option.js b/packages/medusa/src/api/routes/admin/shipping-options/update-shipping-option.js index d64e6202c4..6e874f011d 100644 --- a/packages/medusa/src/api/routes/admin/shipping-options/update-shipping-option.js +++ b/packages/medusa/src/api/routes/admin/shipping-options/update-shipping-option.js @@ -2,6 +2,50 @@ import _ from "lodash" import { MedusaError, Validator } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /shipping-options/{id} + * operationId: "PostShippingOptionsOption" + * summary: "Update Shipping Option" + * description: "Updates a Shipping Option" + * parameters: + * - (path) id=* {string} The id of the Shipping Option. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * name: + * description: "The name of the Shipping Option" + * type: string + * amount: + * description: "The amount to charge for the Shipping Option." + * type: integer + * requirements: + * description: "The requirements that must be satisfied for the Shipping Option to be available." + * type: array + * items: + * properties: + * type: + * description: The type of the requirement + * type: string + * enum: + * - max_subtotal + * - min_subtotal + * amount: + * description: The amount to compare with. + * type: integer + * tags: + * - Shipping Option + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_option: + * $ref: "#/components/schemas/shipping_option" + */ export default async (req, res) => { const { option_id } = req.params const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/admin/shipping-profiles/create-shipping-profile.js b/packages/medusa/src/api/routes/admin/shipping-profiles/create-shipping-profile.js index 6aa0270236..83da5b9dd4 100644 --- a/packages/medusa/src/api/routes/admin/shipping-profiles/create-shipping-profile.js +++ b/packages/medusa/src/api/routes/admin/shipping-profiles/create-shipping-profile.js @@ -1,5 +1,30 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /shipping-profiles + * operationId: "PostShippingProfiles" + * summary: "Create a Shipping Profile" + * description: "Creates a Shipping Profile" + * requestBody: + * content: + * application/json: + * schema: + * properties: + * name: + * description: "The name of the Shipping Profile" + * type: string + * tags: + * - Shipping Profile + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_profile: + * $ref: "#/components/schemas/shipping_profile" + */ export default async (req, res) => { const schema = Validator.object().keys({ name: Validator.string().required(), diff --git a/packages/medusa/src/api/routes/admin/shipping-profiles/delete-shipping-profile.js b/packages/medusa/src/api/routes/admin/shipping-profiles/delete-shipping-profile.js index edbbf359aa..e67e111f5f 100644 --- a/packages/medusa/src/api/routes/admin/shipping-profiles/delete-shipping-profile.js +++ b/packages/medusa/src/api/routes/admin/shipping-profiles/delete-shipping-profile.js @@ -1,3 +1,28 @@ +/** + * @oas [delete] /shipping-profiles/{id} + * operationId: "DeleteShippingProfilesProfile" + * summary: "Delete a Shipping Profile" + * description: "Deletes a Shipping Profile." + * parameters: + * - (path) id=* {string} The id of the Shipping Profile. + * tags: + * - Shipping Profile + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * id: + * type: string + * description: The id of the deleted Shipping Profile. + * object: + * type: string + * description: The type of the object that was deleted. + * deleted: + * type: boolean + */ export default async (req, res) => { const { profile_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/shipping-profiles/get-shipping-profile.js b/packages/medusa/src/api/routes/admin/shipping-profiles/get-shipping-profile.js index ce7381b49e..c2906710c7 100644 --- a/packages/medusa/src/api/routes/admin/shipping-profiles/get-shipping-profile.js +++ b/packages/medusa/src/api/routes/admin/shipping-profiles/get-shipping-profile.js @@ -1,4 +1,24 @@ import { defaultFields, defaultRelations } from "./" + +/** + * @oas [get] /shipping-profiles/{id} + * operationId: "GetShippingProfilesProfile" + * summary: "Retrieve a Shipping Profile" + * description: "Retrieves a Shipping Profile." + * parameters: + * - (path) id=* {string} The id of the Shipping Profile. + * tags: + * - Shipping Profile + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_profile: + * $ref: "#/components/schemas/shipping_profile" + */ export default async (req, res) => { const { profile_id } = req.params try { diff --git a/packages/medusa/src/api/routes/admin/shipping-profiles/list-shipping-profiles.js b/packages/medusa/src/api/routes/admin/shipping-profiles/list-shipping-profiles.js index 28120fa8e0..9c29ca36f6 100644 --- a/packages/medusa/src/api/routes/admin/shipping-profiles/list-shipping-profiles.js +++ b/packages/medusa/src/api/routes/admin/shipping-profiles/list-shipping-profiles.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /shipping-profiles + * operationId: "GetShippingProfiles" + * summary: "List Shipping Profiles" + * description: "Retrieves a list of Shipping Profile." + * tags: + * - Shipping Profile + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_profiles: + * type: array + * items: + * $ref: "#/components/schemas/shipping_profile" + */ export default async (req, res) => { try { const profileService = req.scope.resolve("shippingProfileService") diff --git a/packages/medusa/src/api/routes/admin/shipping-profiles/update-shipping-profile.js b/packages/medusa/src/api/routes/admin/shipping-profiles/update-shipping-profile.js index ad5fc346c6..de05c389af 100644 --- a/packages/medusa/src/api/routes/admin/shipping-profiles/update-shipping-profile.js +++ b/packages/medusa/src/api/routes/admin/shipping-profiles/update-shipping-profile.js @@ -1,5 +1,32 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /shipping-profiles/{id} + * operationId: "PostShippingProfilesProfile" + * summary: "Update a Shipping Profiles" + * description: "Updates a Shipping Profile" + * parameters: + * - (path) id=* {string} The id of the Shipping Profile. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * name: + * description: "The name of the Shipping Profile" + * type: string + * tags: + * - Shipping Profile + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_profiles: + * $ref: "#/components/schemas/shipping_profile" + */ export default async (req, res) => { const { profile_id } = req.params diff --git a/packages/medusa/src/api/routes/admin/store/add-currency.js b/packages/medusa/src/api/routes/admin/store/add-currency.js index 270782bd2d..8ae51798bf 100644 --- a/packages/medusa/src/api/routes/admin/store/add-currency.js +++ b/packages/medusa/src/api/routes/admin/store/add-currency.js @@ -1,3 +1,22 @@ +/** + * @oas [post] /store/currencies/{code} + * operationId: "PostStoreCurrenciesCode" + * summary: "Add a Currency Code" + * description: "Adds a Currency Code to the available currencies." + * parameters: + * - (path) code=* {string} The 3 character ISO currency code. + * tags: + * - Store + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * store: + * $ref: "#/components/schemas/store" + */ export default async (req, res) => { const { currency_code } = req.params diff --git a/packages/medusa/src/api/routes/admin/store/get-store.js b/packages/medusa/src/api/routes/admin/store/get-store.js index 1b7b0cc766..81e6031adb 100644 --- a/packages/medusa/src/api/routes/admin/store/get-store.js +++ b/packages/medusa/src/api/routes/admin/store/get-store.js @@ -1,3 +1,20 @@ +/** + * @oas [get] /store + * operationId: "GetStore" + * summary: "Retrieve Store details." + * description: "Retrieves the Store details" + * tags: + * - Store + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * store: + * $ref: "#/components/schemas/store" + */ export default async (req, res) => { try { const storeService = req.scope.resolve("storeService") diff --git a/packages/medusa/src/api/routes/admin/store/list-payment-providers.js b/packages/medusa/src/api/routes/admin/store/list-payment-providers.js index 3f329b49b6..3739d912ae 100644 --- a/packages/medusa/src/api/routes/admin/store/list-payment-providers.js +++ b/packages/medusa/src/api/routes/admin/store/list-payment-providers.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /store/payment-providers + * operationId: "GetStorePaymentProviders" + * summary: "Retrieve configured Payment Providers" + * description: "Retrieves the configured Payment Providers" + * tags: + * - Store + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * payment_providers: + * type: array + * items: + * $ref: "#/components/schemas/store" + */ export default async (req, res) => { try { const paymentProviderService = container.resolve("paymentProviderService") diff --git a/packages/medusa/src/api/routes/admin/store/remove-currency.js b/packages/medusa/src/api/routes/admin/store/remove-currency.js index 4b73f37c3d..517f8113d4 100644 --- a/packages/medusa/src/api/routes/admin/store/remove-currency.js +++ b/packages/medusa/src/api/routes/admin/store/remove-currency.js @@ -1,3 +1,22 @@ +/** + * @oas [delete] /store/currencies/{code} + * operationId: "DeleteStoreCurrenciesCode" + * summary: "Remvoe a Currency Code" + * description: "Removes a Currency Code from the available currencies." + * parameters: + * - (path) code=* {string} The 3 character ISO currency code. + * tags: + * - Store + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * store: + * $ref: "#/components/schemas/store" + */ export default async (req, res) => { const { currency_code } = req.params diff --git a/packages/medusa/src/api/routes/admin/store/update-store.js b/packages/medusa/src/api/routes/admin/store/update-store.js index ce63b7fbc9..61d9bfeb42 100644 --- a/packages/medusa/src/api/routes/admin/store/update-store.js +++ b/packages/medusa/src/api/routes/admin/store/update-store.js @@ -1,5 +1,36 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /store + * operationId: "PostStore" + * summary: "Update Store details." + * description: "Updates the Store details" + * requestBody: + * content: + * application/json: + * schema: + * properties: + * name: + * description: "The name of the Store" + * type: string + * swap_link_template: + * description: "A template for Swap links - use `{{cart_id}}` to insert the Swap Cart id" + * type: string + * default_currency_code: + * description: "The default currency code for the Store." + * type: string + * tags: + * - Store + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * store: + * $ref: "#/components/schemas/store" + */ export default async (req, res) => { const schema = Validator.object().keys({ name: Validator.string(), diff --git a/packages/medusa/src/api/routes/admin/swaps/list-swaps.js b/packages/medusa/src/api/routes/admin/swaps/list-swaps.js index e5d5859faa..f9e9e47966 100644 --- a/packages/medusa/src/api/routes/admin/swaps/list-swaps.js +++ b/packages/medusa/src/api/routes/admin/swaps/list-swaps.js @@ -1,5 +1,24 @@ import _ from "lodash" +/** + * @oas [get] /swaps + * operationId: "GetSwaps" + * summary: "List Swaps" + * description: "Retrieves a list of Swaps." + * tags: + * - Swap + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * swaps: + * type: array + * items: + * $ref: "#/components/schemas/swap" + */ export default async (req, res) => { try { const swapService = req.scope.resolve("swapService") diff --git a/packages/medusa/src/api/routes/admin/variants/list-variants.js b/packages/medusa/src/api/routes/admin/variants/list-variants.js index a159c593cc..c695e8e4b6 100644 --- a/packages/medusa/src/api/routes/admin/variants/list-variants.js +++ b/packages/medusa/src/api/routes/admin/variants/list-variants.js @@ -1,6 +1,25 @@ import _ from "lodash" import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /variants + * operationId: "GetVariants" + * summary: "List Product Variants." + * description: "Retrieves a list of Product Variants" + * tags: + * - Product Variant + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * variants: + * type: array + * items: + * $ref: "#/components/schemas/product_variant" + */ export default async (req, res) => { try { const variantService = req.scope.resolve("productVariantService") diff --git a/packages/medusa/src/api/routes/store/auth/create-session.js b/packages/medusa/src/api/routes/store/auth/create-session.js index 25747c7abe..75cfd2f323 100644 --- a/packages/medusa/src/api/routes/store/auth/create-session.js +++ b/packages/medusa/src/api/routes/store/auth/create-session.js @@ -2,6 +2,26 @@ import jwt from "jsonwebtoken" import { Validator } from "medusa-core-utils" import config from "../../../../config" +/** + * @oas [post] /auth + * operationId: "PostAuth" + * summary: "Authenticate Customer" + * description: "Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser." + * parameters: + * - (body) email=* {string} The Customer's email. + * - (body) password=* {string} The Customer's password. + * tags: + * - Auth + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { body } = req const schema = Validator.object().keys({ diff --git a/packages/medusa/src/api/routes/store/auth/delete-session.js b/packages/medusa/src/api/routes/store/auth/delete-session.js index 8d5404913a..784b1e108f 100644 --- a/packages/medusa/src/api/routes/store/auth/delete-session.js +++ b/packages/medusa/src/api/routes/store/auth/delete-session.js @@ -1,3 +1,14 @@ +/** + * @oas [delete] /auth + * operationId: "DeleteAuth" + * summary: "Log out" + * description: "Destroys a Customer's authenticated session." + * tags: + * - Auth + * responses: + * "200": + * description: OK + */ export default async (req, res) => { req.session.jwt = {} res.json({}) diff --git a/packages/medusa/src/api/routes/store/auth/exists.js b/packages/medusa/src/api/routes/store/auth/exists.js index deb2bbac2d..6bf8c5f921 100644 --- a/packages/medusa/src/api/routes/store/auth/exists.js +++ b/packages/medusa/src/api/routes/store/auth/exists.js @@ -1,5 +1,24 @@ import { Validator, MedusaError } from "medusa-core-utils" +/** + * @oas [get] /auth/{email} + * operationId: "GetAuthEmail" + * summary: "Check if email has account" + * description: "Checks if a Customer with the given email has signed up." + * parameters: + * - (path) email=* {string} The Customer's email. + * tags: + * - Auth + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * exists: + * type: boolean + */ export default async (req, res) => { const { email } = req.params diff --git a/packages/medusa/src/api/routes/store/auth/get-session.js b/packages/medusa/src/api/routes/store/auth/get-session.js index f3c8859be7..da125cf822 100644 --- a/packages/medusa/src/api/routes/store/auth/get-session.js +++ b/packages/medusa/src/api/routes/store/auth/get-session.js @@ -1,3 +1,20 @@ +/** + * @oas [get] /auth + * operationId: "GetAuth" + * summary: "Get Session" + * description: "Gets the currently logged in Customer." + * tags: + * - Auth + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { try { if (req.user && req.user.customer_id) { diff --git a/packages/medusa/src/api/routes/store/carts/add-shipping-method.js b/packages/medusa/src/api/routes/store/carts/add-shipping-method.js index 6c71cde1cf..731b4ba9c0 100644 --- a/packages/medusa/src/api/routes/store/carts/add-shipping-method.js +++ b/packages/medusa/src/api/routes/store/carts/add-shipping-method.js @@ -2,6 +2,27 @@ import _ from "lodash" import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /carts/{id}/shipping-methods + * operationId: "PostCartsCartShippingMethod" + * description: "Adds a Shipping Method to the Cart." + * summary: "Add a Shipping Method" + * tags: + * - Cart + * parameters: + * - (path) id=* {String} The cart id. + * - (body) option_id=* {String} id of the shipping option to create the method from + * - (body) data {Object} Used to hold any data that the shipping method may need to process the fulfillment of the order. Look at the documentation for your installed fulfillment providers to find out what to send. + * responses: + * "200": + * description: "A successful response" + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/complete-cart.js b/packages/medusa/src/api/routes/store/carts/complete-cart.js index 41341f4d63..f3d02f9a61 100644 --- a/packages/medusa/src/api/routes/store/carts/complete-cart.js +++ b/packages/medusa/src/api/routes/store/carts/complete-cart.js @@ -1,5 +1,38 @@ import { MedusaError } from "medusa-core-utils" +/** + * @oas [post] /carts/{id}/complete-cart + * summary: "Complete a Cart" + * operationId: "PostCartsCartComplete" + * description: "Completes a cart. The following steps will be performed. Payment + * authorization is attempted and if more work is required, we simply return + * the cart for further updates. If payment is authorized and order is not yet + * created, we make sure to do so. The completion of a cart can be performed + * idempotently with a provided header `Idempotency-Key`. If not provided, we + * will generate one for the request." + * parameters: + * - (path) id=* {String} The Cart id. + * tags: + * - Cart + * responses: + * 200: + * description: "If a cart was successfully authorized, but requires further + * action from the user the response body will contain the cart with an + * updated payment session. If the Cart was successfully completed the + * response body will contain the newly created Order." + * content: + * application/json: + * schema: + * oneOf: + * - type: object + * properties: + * order: + * $ref: "#/components/schemas/order" + * - type: object + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/create-cart.js b/packages/medusa/src/api/routes/store/carts/create-cart.js index e22f7dc7ec..7bacb6edaf 100644 --- a/packages/medusa/src/api/routes/store/carts/create-cart.js +++ b/packages/medusa/src/api/routes/store/carts/create-cart.js @@ -1,6 +1,48 @@ import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /carts + * summary: "Create a Cart" + * operationId: "PostCart" + * description: "Creates a Cart within the given region and with the initial items. If no + * `region_id` is provided the cart will be associated with the first Region + * available. If no items are provided the cart will be empty after creation. + * If a user is logged in the cart's customer id and email will be set." + * requestBody: + * content: + * application/json: + * schema: + * properties: + * region_id: + * type: string + * description: The id of the Region to create the Cart in. + * country_code: + * type: string + * description: "The 2 character ISO country code to create the Cart in." + * items: + * description: "An optional array of `variant_id`, `quantity` pairs to generate Line Items from." + * type: array + * items: + * properties: + * variant_id: + * description: The id of the Product Variant to generate a Line Item from. + * type: string + * quantity: + * description: The quantity of the Product Variant to add + * type: integer + * tags: + * - Cart + * responses: + * 200: + * description: "Successfully created a new Cart" + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const schema = Validator.object().keys({ region_id: Validator.string().optional(), diff --git a/packages/medusa/src/api/routes/store/carts/create-line-item.js b/packages/medusa/src/api/routes/store/carts/create-line-item.js index 711ff5c506..da804f1eb5 100644 --- a/packages/medusa/src/api/routes/store/carts/create-line-item.js +++ b/packages/medusa/src/api/routes/store/carts/create-line-item.js @@ -1,6 +1,29 @@ import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /carts/{id}/line-items + * operationId: PostCartsCartLineItems + * summary: "Add a Line Item" + * description: "Generates a Line Item with a given Product Variant and adds it + * to the Cart" + * parameters: + * - (path) id=* {string} The id of the Cart to add the Line Item to. + * - (body) variant_id=* {string} The id of the Product Variant to generate the Line Item from. + * - (body) quantity=* {integer} The quantity of the Product Variant to add to the Line Item. + * - (body) metadata {object} An optional key-value map with additional details about the Line Item. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/create-payment-sessions.js b/packages/medusa/src/api/routes/store/carts/create-payment-sessions.js index 7f9f8aa16d..61f562d44d 100644 --- a/packages/medusa/src/api/routes/store/carts/create-payment-sessions.js +++ b/packages/medusa/src/api/routes/store/carts/create-payment-sessions.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /carts/{id}/payment-sessions + * operationId: "PostCartsCartPaymentSessions" + * summary: "Initialize Payment Sessions" + * description: "Creates Payment Sessions for each of the available Payment Providers in the Cart's Region." + * parameters: + * - (path) id=* {string} The id of the Cart. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/delete-discount.js b/packages/medusa/src/api/routes/store/carts/delete-discount.js index 8b0b3573dc..cd19d1a497 100644 --- a/packages/medusa/src/api/routes/store/carts/delete-discount.js +++ b/packages/medusa/src/api/routes/store/carts/delete-discount.js @@ -1,4 +1,25 @@ import { defaultFields, defaultRelations } from "./" + +/** + * @oas [delete] /carts/{id}/discounts/{code} + * operationId: DeleteCartsCartDiscountsDiscount + * description: "Removes a Discount from a Cart." + * summary: "Remove Discount from Cart" + * parameters: + * - (path) id=* {string} The id of the Cart. + * - (path) code=* {string} The unique Discount code. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id, code } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/delete-line-item.js b/packages/medusa/src/api/routes/store/carts/delete-line-item.js index 2d95414fd7..5bb03b37e8 100644 --- a/packages/medusa/src/api/routes/store/carts/delete-line-item.js +++ b/packages/medusa/src/api/routes/store/carts/delete-line-item.js @@ -1,4 +1,25 @@ import { defaultFields, defaultRelations } from "./" + +/** + * @oas [delete] /carts/{id}/line-items/{line_id} + * operationId: DeleteCartsCartLineItemsItem + * summary: Delete a Line Item + * description: "Removes a Line Item from a Cart." + * parameters: + * - (path) id=* {string} The id of the Cart. + * - (path) line_id=* {string} The id of the Line Item. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id, line_id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/delete-payment-session.js b/packages/medusa/src/api/routes/store/carts/delete-payment-session.js index 058c19b3ad..9aeb6b9bc4 100644 --- a/packages/medusa/src/api/routes/store/carts/delete-payment-session.js +++ b/packages/medusa/src/api/routes/store/carts/delete-payment-session.js @@ -1,5 +1,25 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [delete] /carts/{id}/payment-sessions/{provider_id} + * operationId: DeleteCartsCartPaymentSessionsSession + * summary: "Delete a Payment Session" + * description: "Deletes a Payment Session on a Cart. May be useful if a payment has failed." + * parameters: + * - (path) id=* {string} The id of the Cart. + * - (path) provider_id=* {string} The id of the Payment Provider used to create the Payment Session to be deleted. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id, provider_id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/get-cart.js b/packages/medusa/src/api/routes/store/carts/get-cart.js index 6fa02a1a7f..32c91bed9c 100644 --- a/packages/medusa/src/api/routes/store/carts/get-cart.js +++ b/packages/medusa/src/api/routes/store/carts/get-cart.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "./" +/** + * @oas [get] /carts/{id} + * operationId: "GetCartsCart" + * summary: "Retrieve a Cart" + * description: "Retrieves a Cart." + * parameters: + * - (path) id=* {string} The id of the Cart. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/refresh-payment-session.js b/packages/medusa/src/api/routes/store/carts/refresh-payment-session.js index 7e21b915c6..8d626405b1 100644 --- a/packages/medusa/src/api/routes/store/carts/refresh-payment-session.js +++ b/packages/medusa/src/api/routes/store/carts/refresh-payment-session.js @@ -1,3 +1,23 @@ +/** + * @oas [post] /carts/{id}/payment-sessions/{provider_id} + * operationId: PostCartsCartPaymentSessionsSession + * summary: Refresh a Payment Session + * description: "Refreshes a Payment Session to ensure that it is in sync with the Cart - this is usually not necessary." + * parameters: + * - (path) id=* {string} The id of the Cart. + * - (path) provider_id=* {string} The id of the Payment Provider that created the Payment Session to be refreshed. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id, provider_id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/set-payment-session.js b/packages/medusa/src/api/routes/store/carts/set-payment-session.js index cbcf4937b3..7b0be8970a 100644 --- a/packages/medusa/src/api/routes/store/carts/set-payment-session.js +++ b/packages/medusa/src/api/routes/store/carts/set-payment-session.js @@ -1,6 +1,26 @@ import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /carts/{id}/payment-session + * operationId: PostCartsCartPaymentSession + * summary: Select a Payment Session + * description: "Selects a Payment Session as the session intended to be used towards the completion of the Cart." + * parameters: + * - (path) id=* {string} The id of the Cart. + * - (body) provider_id=* {string} The id of the Payment Provider. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/update-cart.js b/packages/medusa/src/api/routes/store/carts/update-cart.js index 73235dd1cc..bccdfc45d2 100644 --- a/packages/medusa/src/api/routes/store/carts/update-cart.js +++ b/packages/medusa/src/api/routes/store/carts/update-cart.js @@ -3,6 +3,66 @@ import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /store/carts/{id} + * operationId: PostCartsCart + * summary: Update a Cart" + * description: "Updates a Cart." + * parameters: + * - (path) id=* {string} The id of the Cart. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * region_id: + * type: string + * description: The id of the Region to create the Cart in. + * country_code: + * type: string + * description: "The 2 character ISO country code to create the Cart in." + * email: + * type: string + * description: "An email to be used on the Cart." + * billing_address: + * description: "The Address to be used for billing purposes." + * anyOf: + * - $ref: "#/components/schemas/address" + * shipping_address: + * description: "The Address to be used for shipping." + * anyOf: + * - $ref: "#/components/schemas/address" + * gift_cards: + * description: "An array of Gift Card codes to add to the Cart." + * type: array + * items: + * properties: + * code: + * description: "The code that a Gift Card is identified by." + * type: string + * discounts: + * description: "An array of Discount codes to add to the Cart." + * type: array + * items: + * properties: + * code: + * description: "The code that a Discount is identifed by." + * type: string + * customer_id: + * description: "The id of the Customer to associate the Cart with." + * type: string + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/update-line-item.js b/packages/medusa/src/api/routes/store/carts/update-line-item.js index 0de2ad4c04..b4c7728db3 100644 --- a/packages/medusa/src/api/routes/store/carts/update-line-item.js +++ b/packages/medusa/src/api/routes/store/carts/update-line-item.js @@ -1,6 +1,27 @@ import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /carts/{id}/line-items/{line_id} + * operationId: PostCartsCartLineItemsItem + * summary: Update a Line Item + * description: "Updates a Line Item if the desired quantity can be fulfilled." + * parameters: + * - (path) id=* {string} The id of the Cart. + * - (path) line_id=* {string} The id of the Line Item. + * - (body) quantity=* {integer} The quantity to set the Line Item to. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id, line_id } = req.params diff --git a/packages/medusa/src/api/routes/store/carts/update-payment-session.js b/packages/medusa/src/api/routes/store/carts/update-payment-session.js index 3a503bd16c..e86ed96adb 100644 --- a/packages/medusa/src/api/routes/store/carts/update-payment-session.js +++ b/packages/medusa/src/api/routes/store/carts/update-payment-session.js @@ -1,6 +1,27 @@ import { Validator, MedusaError } from "medusa-core-utils" import { defaultFields, defaultRelations } from "./" +/** + * @oas [post] /carts/{id}/payment-session/update + * operationId: PostCartsCartPaymentSessionUpdate + * summary: Update a Payment Session + * description: "Updates a Payment Session with additional data." + * parameters: + * - (path) id=* {string} The id of the Cart. + * - (body) provider_id=* {string} The id of the Payment Provider responsible for the Payment Session to update. + * - (body) data=* {object} The data to update the payment session with. + * tags: + * - Cart + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * cart: + * $ref: "#/components/schemas/cart" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/customers/create-address.js b/packages/medusa/src/api/routes/store/customers/create-address.js index 3cec6d6d00..26c71c387e 100644 --- a/packages/medusa/src/api/routes/store/customers/create-address.js +++ b/packages/medusa/src/api/routes/store/customers/create-address.js @@ -1,5 +1,33 @@ import { Validator, MedusaError } from "medusa-core-utils" +/** + * @oas [post] /customers/{id}/addresses + * operationId: PostCustomersCustomerAddresses + * summary: "Add a Shipping Address" + * description: "Adds a Shipping Address to a Customer's saved addresses." + * parameters: + * - (path) id=* {String} The Customer id. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * address: + * description: "The Address to add to the Customer." + * anyOf: + * - $ref: "#/components/schemas/address" + * tags: + * - Customer + * responses: + * "200": + * description: "A successful response" + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/customers/create-customer.js b/packages/medusa/src/api/routes/store/customers/create-customer.js index 3d400a121e..49fa4ee381 100644 --- a/packages/medusa/src/api/routes/store/customers/create-customer.js +++ b/packages/medusa/src/api/routes/store/customers/create-customer.js @@ -2,6 +2,29 @@ import jwt from "jsonwebtoken" import { Validator, MedusaError } from "medusa-core-utils" import config from "../../../../config" +/** + * @oas [post] /customers + * operationId: PostCustomers + * summary: Create a Customer + * description: "Creates a Customer account." + * parameters: + * - (body) email=* {string} The Customer's email address. + * - (body) first_name=* {string} The Customer's first name. + * - (body) last_name=* {string} The Customer's last name. + * - (body) password=* {string} The Customer's password for login. + * - (body) phone {string} The Customer's phone number. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const schema = Validator.object().keys({ email: Validator.string() diff --git a/packages/medusa/src/api/routes/store/customers/delete-address.js b/packages/medusa/src/api/routes/store/customers/delete-address.js index a564f47af5..aa105f041b 100644 --- a/packages/medusa/src/api/routes/store/customers/delete-address.js +++ b/packages/medusa/src/api/routes/store/customers/delete-address.js @@ -1,15 +1,34 @@ +/** + * @oas [delete] /customers/{id}/addresses/{address_id} + * operationId: DeleteCustomersCustomerAddressesAddress + * summary: Delete an Address + * description: "Removes an Address from the Customer's saved addresse." + * parameters: + * - (path) id=* {string} The id of the Customer. + * - (path) address_id=* {string} The id of the Address to remove. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id, address_id } = req.params const customerService = req.scope.resolve("customerService") try { - let customer = await customerService.removeAddress(id, address_id) - + await customerService.removeAddress(id, address_id) customer = await customerService.retrieve(id, { relations: ["shipping_addresses"], }) - res.json({ customer: data }) + res.json({ customer }) } catch (err) { throw err } diff --git a/packages/medusa/src/api/routes/store/customers/get-customer.js b/packages/medusa/src/api/routes/store/customers/get-customer.js index 7f472d9ab9..a8ca49bf67 100644 --- a/packages/medusa/src/api/routes/store/customers/get-customer.js +++ b/packages/medusa/src/api/routes/store/customers/get-customer.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /customers/{id} + * operationId: GetCustomersCustomer + * summary: Retrieves a Customer + * description: "Retrieves a Customer - the Customer must be logged in to retrieve their details." + * parameters: + * - (path) id=* {string} The id of the Customer. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id } = req.params try { diff --git a/packages/medusa/src/api/routes/store/customers/get-payment-methods.js b/packages/medusa/src/api/routes/store/customers/get-payment-methods.js index 0f5a9a662a..73cb812c30 100644 --- a/packages/medusa/src/api/routes/store/customers/get-payment-methods.js +++ b/packages/medusa/src/api/routes/store/customers/get-payment-methods.js @@ -1,3 +1,30 @@ +/** + * @oas [get] /customers/{id}/payment-methods + * operationId: GetCustomersCustomerPaymentMethods + * summary: Retrieve saved payment methods + * description: "Retrieves a list of a Customer's saved payment methods. Payment methods are saved with Payment Providers and it is their responsibility to fetch saved methods." + * parameters: + * - (path) id=* {string} The id of the Customer. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * payment_methods: + * type: array + * items: + * properties: + * provider_id: + * type: string + * description: The id of the Payment Provider where the payment method is saved. + * data: + * type: object + * description: The data needed for the Payment Provider to use the saved payment method. + */ export default async (req, res) => { const { id } = req.params try { diff --git a/packages/medusa/src/api/routes/store/customers/list-orders.js b/packages/medusa/src/api/routes/store/customers/list-orders.js index 673f967109..47491805f4 100644 --- a/packages/medusa/src/api/routes/store/customers/list-orders.js +++ b/packages/medusa/src/api/routes/store/customers/list-orders.js @@ -6,6 +6,27 @@ import { allowedRelations, } from "../orders" +/** + * @oas [get] /customers/{id}/orders + * operationId: GetCustomersCustomerOrders + * summary: Retrieve Customer Orders + * description: "Retrieves a list of a Customer's Orders." + * parameters: + * - (path) id=* {string} The id of the Customer. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * payment_methods: + * type: array + * items: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { id } = req.params try { diff --git a/packages/medusa/src/api/routes/store/customers/reset-password-token.js b/packages/medusa/src/api/routes/store/customers/reset-password-token.js index 75c36a2300..6898fd8a47 100644 --- a/packages/medusa/src/api/routes/store/customers/reset-password-token.js +++ b/packages/medusa/src/api/routes/store/customers/reset-password-token.js @@ -1,5 +1,18 @@ import { MedusaError, Validator } from "medusa-core-utils" +/** + * @oas [post] /customers/{id}/password-token + * operationId: PostCustomersCustomerPasswordToken + * summary: Creates a reset password token + * description: "Creates a reset password token to be used in a subsequent /reset-password request. The password token should be sent out of band e.g. via email and will not be returned." + * parameters: + * - (path) id=* {string} The id of the Customer. + * tags: + * - Customer + * responses: + * 204: + * description: OK + */ export default async (req, res) => { const schema = Validator.object().keys({ email: Validator.string() diff --git a/packages/medusa/src/api/routes/store/customers/reset-password.js b/packages/medusa/src/api/routes/store/customers/reset-password.js index 47a13eab74..4c0f09045c 100644 --- a/packages/medusa/src/api/routes/store/customers/reset-password.js +++ b/packages/medusa/src/api/routes/store/customers/reset-password.js @@ -1,6 +1,28 @@ import { MedusaError, Validator } from "medusa-core-utils" import jwt from "jsonwebtoken" +/** + * @oas [post] /customers/{id}/reset-password + * operationId: PostCustomersCustomerResetPassword + * summary: Resets Customer password + * description: "Resets a Customer's password using a password token created by a previous /password-token request." + * parameters: + * - (path) id=* {string} The id of the Customer. + * - (body) email=* {string} The Customer's email. + * - (body) token=* {string} The password token created by a /password-token request. + * - (body) password=* {string} The new password to set for the Customer. + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const schema = Validator.object().keys({ email: Validator.string() diff --git a/packages/medusa/src/api/routes/store/customers/update-address.js b/packages/medusa/src/api/routes/store/customers/update-address.js index 2562dc2410..234a1350e0 100644 --- a/packages/medusa/src/api/routes/store/customers/update-address.js +++ b/packages/medusa/src/api/routes/store/customers/update-address.js @@ -1,5 +1,34 @@ import { Validator, MedusaError } from "medusa-core-utils" +/** + * @oas [post] /customers/{id}/addresses/{address_id} + * operationId: PostCustomersCustomerAddressesAddress + * summary: "Update a Shipping Address" + * description: "Updates a Customer's saved Shipping Address." + * parameters: + * - (path) id=* {String} The Customer id. + * - (path) address_id=* {String} The id of the Address to update. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * address: + * description: "The updated Address." + * anyOf: + * - $ref: "#/components/schemas/address" + * tags: + * - Customer + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id, address_id } = req.params diff --git a/packages/medusa/src/api/routes/store/customers/update-customer.js b/packages/medusa/src/api/routes/store/customers/update-customer.js index 106fbe1ebd..1c67cbc0a2 100644 --- a/packages/medusa/src/api/routes/store/customers/update-customer.js +++ b/packages/medusa/src/api/routes/store/customers/update-customer.js @@ -1,5 +1,41 @@ import { Validator, MedusaError } from "medusa-core-utils" +/** + * @oas [post] /customers/{id} + * operationId: PostCustomersCustomer + * summary: Update Customer details + * description: "Updates a Customer's saved details." + * parameters: + * - (path) id=* {string} The id of the Customer. + * requestBody: + * content: + * application/json: + * schema: + * properties: + * first_name: + * description: "The Customer's first name." + * type: string + * last_name: + * description: "The Customer's last name." + * type: string + * password: + * description: "The Customer's password." + * type: string + * phone: + * description: "The Customer's phone number." + * type: string + * tags: + * - Customer + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/orders/get-order-by-cart.js b/packages/medusa/src/api/routes/store/orders/get-order-by-cart.js index de79de24f8..45651301e7 100644 --- a/packages/medusa/src/api/routes/store/orders/get-order-by-cart.js +++ b/packages/medusa/src/api/routes/store/orders/get-order-by-cart.js @@ -1,5 +1,24 @@ import { defaultFields, defaultRelations } from "." +/** + * @oas [get] /orders/cart/{cart_id} + * operationId: GetOrdersOrderCartId + * summary: Retrieves Order by Cart id + * description: "Retrieves an Order by the id of the Cart that was used to create the Order." + * parameters: + * - (path) cart_id=* {string} The id of Cart. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const { cart_id } = req.params diff --git a/packages/medusa/src/api/routes/store/orders/get-order.js b/packages/medusa/src/api/routes/store/orders/get-order.js index f2d8dcc089..e7acf6e74b 100644 --- a/packages/medusa/src/api/routes/store/orders/get-order.js +++ b/packages/medusa/src/api/routes/store/orders/get-order.js @@ -1,5 +1,24 @@ import { defaultRelations, defaultFields } from "./index" +/** + * @oas [get] /orders/{id} + * operationId: GetOrdersOrder + * summary: Retrieves an Order + * description: "Retrieves an Order" + * parameters: + * - (path) id=* {string} The id of the Order. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * customer: + * $ref: "#/components/schemas/customer" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/products/get-product.js b/packages/medusa/src/api/routes/store/products/get-product.js index c458d1f0a5..9a1cc19be7 100644 --- a/packages/medusa/src/api/routes/store/products/get-product.js +++ b/packages/medusa/src/api/routes/store/products/get-product.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /products/{id} + * operationId: GetProductsProduct + * summary: Retrieves a Product + * description: "Retrieves a Product." + * parameters: + * - (path) id=* {string} The id of the Product. + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * product: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/products/list-products.js b/packages/medusa/src/api/routes/store/products/list-products.js index 8645243187..29d6342606 100644 --- a/packages/medusa/src/api/routes/store/products/list-products.js +++ b/packages/medusa/src/api/routes/store/products/list-products.js @@ -1,3 +1,31 @@ +/** + * @oas [get] /products + * operationId: GetProducts + * summary: List Products + * description: "Retrieves a list of Products." + * tags: + * - Product + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * count: + * description: The total number of Products. + * type: integer + * offset: + * description: The offset for pagination. + * type: integer + * limit: + * description: The maxmimum number of Products to return, + * type: integer + * products: + * type: array + * items: + * $ref: "#/components/schemas/product" + */ export default async (req, res) => { try { const productService = req.scope.resolve("productService") diff --git a/packages/medusa/src/api/routes/store/regions/get-region.js b/packages/medusa/src/api/routes/store/regions/get-region.js index a6d314a0f9..2b500c09ee 100644 --- a/packages/medusa/src/api/routes/store/regions/get-region.js +++ b/packages/medusa/src/api/routes/store/regions/get-region.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /regions/{id} + * operationId: GetRegionsRegion + * summary: Retrieves a Region + * description: "Retrieves a Region." + * parameters: + * - (path) id=* {string} The id of the Region. + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * region: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const { region_id } = req.params const regionService = req.scope.resolve("regionService") diff --git a/packages/medusa/src/api/routes/store/regions/list-regions.js b/packages/medusa/src/api/routes/store/regions/list-regions.js index 4fd39e1047..0afb20a2c9 100644 --- a/packages/medusa/src/api/routes/store/regions/list-regions.js +++ b/packages/medusa/src/api/routes/store/regions/list-regions.js @@ -1,3 +1,31 @@ +/** + * @oas [get] /regions + * operationId: GetRegions + * summary: List Regions + * description: "Retrieves a list of Regions." + * tags: + * - Region + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * count: + * description: The total number of regions. + * type: integer + * offset: + * description: The offset for pagination. + * type: integer + * limit: + * description: The maxmimum number of regions to return, + * type: integer + * regions: + * type: array + * items: + * $ref: "#/components/schemas/region" + */ export default async (req, res) => { const regionService = req.scope.resolve("regionService") diff --git a/packages/medusa/src/api/routes/store/shipping-options/list-options.js b/packages/medusa/src/api/routes/store/shipping-options/list-options.js index 704abda25e..fec19753c7 100644 --- a/packages/medusa/src/api/routes/store/shipping-options/list-options.js +++ b/packages/medusa/src/api/routes/store/shipping-options/list-options.js @@ -1,3 +1,25 @@ +/** + * @oas [get] /shipping-options + * operationId: GetShippingOptions + * summary: Retrieve Shipping Options + * description: "Retrieves a list of Shipping Options." + * parameters: + * - (query) product_ids {string} A comma separated list of Product ids to filter Shipping Options by. + * - (query) region_id {string} the Region to retrieve Shipping Options from. + * tags: + * - Shipping Option + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_options: + * type: array + * items: + * $ref: "#/components/schemas/shipping_option" + */ export default async (req, res) => { const productIds = (req.query.product_ids && req.query.product_ids.split(",")) || [] diff --git a/packages/medusa/src/api/routes/store/shipping-options/list-shipping-options.js b/packages/medusa/src/api/routes/store/shipping-options/list-shipping-options.js index a882ba91a3..e89a9d92f0 100644 --- a/packages/medusa/src/api/routes/store/shipping-options/list-shipping-options.js +++ b/packages/medusa/src/api/routes/store/shipping-options/list-shipping-options.js @@ -1,5 +1,26 @@ import { Validator, MedusaError } from "medusa-core-utils" +/** + * @oas [get] /shipping-options/{cart_id} + * operationId: GetShippingOptionsCartId + * summary: Retrieve Shipping Options for Cart + * description: "Retrieves a list of Shipping Options available to a cart." + * parameters: + * - (path) cart_id {string} The id of the Cart. + * tags: + * - Shipping Option + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * shipping_options: + * type: array + * items: + * $ref: "#/components/schemas/shipping_option" + */ export default async (req, res) => { const schema = Validator.object().keys({ cart_id: Validator.string().required(), diff --git a/packages/medusa/src/api/routes/store/swaps/get-swap-by-cart.js b/packages/medusa/src/api/routes/store/swaps/get-swap-by-cart.js index 41ea0cf0a8..54da6e4ccb 100644 --- a/packages/medusa/src/api/routes/store/swaps/get-swap-by-cart.js +++ b/packages/medusa/src/api/routes/store/swaps/get-swap-by-cart.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /swaps/{cart_id} + * operationId: GetSwapsSwapCartId + * summary: Retrieve Swap by Cart id + * description: "Retrieves a Swap by the id of the Cart used to confirm the Swap." + * parameters: + * - (path) cart_id {string} The id of the Cart + * tags: + * - Swap + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * swap: + * $ref: "#/components/schemas/swap" + */ export default async (req, res) => { const { cart_id } = req.params diff --git a/packages/medusa/src/api/routes/store/variants/get-variant.js b/packages/medusa/src/api/routes/store/variants/get-variant.js index 733e497ed6..31a6b90a5a 100644 --- a/packages/medusa/src/api/routes/store/variants/get-variant.js +++ b/packages/medusa/src/api/routes/store/variants/get-variant.js @@ -1,3 +1,22 @@ +/** + * @oas [get] /variants/{variant_id} + * operationId: GetVariantsVariant + * summary: Retrieve a Product Variant + * description: "Retrieves a Product Variant by id" + * parameters: + * - (path) variant_id=* {string} The id of the Product Variant. + * tags: + * - Product Variant + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * variant: + * $ref: "#/components/schemas/product_variant" + */ export default async (req, res) => { const { id } = req.params diff --git a/packages/medusa/src/api/routes/store/variants/list-variants.js b/packages/medusa/src/api/routes/store/variants/list-variants.js index cdb9461c12..b6376e7e69 100644 --- a/packages/medusa/src/api/routes/store/variants/list-variants.js +++ b/packages/medusa/src/api/routes/store/variants/list-variants.js @@ -1,3 +1,24 @@ +/** + * @oas [get] /variants + * operationId: GetVariants + * summary: Retrieve Product Variants + * description: "Retrieves a list of Product Variants" + * parameters: + * - (query) ids {string} A comma separated list of Product Variant ids to filter by. + * tags: + * - Product Variant + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * variants: + * type: array + * items: + * $ref: "#/components/schemas/product_variant" + */ export default async (req, res) => { const limit = parseInt(req.query.limit) || 100 const offset = parseInt(req.query.offset) || 0 diff --git a/packages/medusa/src/index.js b/packages/medusa/src/index.js index 3ff3ec0c8b..8c0e3d8984 100644 --- a/packages/medusa/src/index.js +++ b/packages/medusa/src/index.js @@ -1,4 +1,5 @@ export { Address } from "./models/address" +export { Notification } from "./models/notification" export { Cart } from "./models/cart" export { ClaimImage } from "./models/claim-image" export { ClaimItem } from "./models/claim-item" diff --git a/packages/medusa/src/models/address.ts b/packages/medusa/src/models/address.ts index 573c90c970..fb83c24b31 100644 --- a/packages/medusa/src/models/address.ts +++ b/packages/medusa/src/models/address.ts @@ -1,3 +1,31 @@ +/** + * @schema address + * title: "Address" + * description: "An address." + * x-resourceId: address + * properties: + * id: + * type: string + * customer_id: + * type: string + * company: + * type: string + * first_name: + * type: string + * last_name: + * type: string + * address_1: + * type: string + * address_2: + * type: string + * city: + * type: string + * country_code: + * type: string + * country: + * $ref: "#/components/schemas/country" + */ + import { Entity, Index, diff --git a/packages/medusa/src/models/cart.ts b/packages/medusa/src/models/cart.ts index 0e9e0cfe07..1e48c62701 100644 --- a/packages/medusa/src/models/cart.ts +++ b/packages/medusa/src/models/cart.ts @@ -1,3 +1,87 @@ +/** + * @schema cart + * title: "Cart" + * description: "Represents a user cart" + * x-resourceId: cart + * properties: + * id: + * type: string + * email: + * type: string + * billing_address_id: + * type: string + * billing_address: + * $ref: "#/components/schemas/address" + * shipping_address_id: + * type: string + * shipping_address: + * $ref: "#/components/schemas/address" + * items: + * type: array + * items: + * $ref: "#/components/schemas/line_item" + * region_id: + * type: string + * region: + * $ref: "#/components/schemas/region" + * discounts: + * type: array + * items: + * $ref: "#/components/schemas/region" + * gift_cards: + * type: array + * items: + * $ref: "#/components/schemas/gift_card" + * customer_id: + * type: string + * customer: + * $ref: "#/components/schemas/customer" + * payment_session: + * $ref: "#/components/schemas/payment_session" + * payment_sessions: + * type: array + * items: + * $ref: "#/components/schemas/payment_session" + * payment: + * $ref: "#/components/schemas/payment" + * shipping_methods: + * type: array + * items: + * $ref: "#/components/schemas/shipping_method" + * type: + * type: string + * enum: + * - default + * - swap + * - payment_link + * completed_at: + * type: string + * format: date-time + * created_at: + * type: string + * format: date-time + * updated_at: + * type: string + * format: date-time + * deleted_at: + * type: string + * format: date-time + * metadata: + * type: object + * shipping_total: + * type: integer + * discount_total: + * type: integer + * tax_total: + * type: integer + * subtotal: + * type: integer + * refundable_amount: + * type: integer + * gift_card_total: + * type: integer + */ + import { Entity, BeforeInsert, diff --git a/packages/medusa/src/models/claim-image.ts b/packages/medusa/src/models/claim-image.ts index 60fc04bf09..23a65ceccc 100644 --- a/packages/medusa/src/models/claim-image.ts +++ b/packages/medusa/src/models/claim-image.ts @@ -52,3 +52,28 @@ export class ClaimImage { this.id = `cimg_${id}` } } + +/** + * @schema claim_image + * title: "Claim Image" + * description: "Represents photo documentation of a claim." + * x-resourceId: claim_image + * properties: + * id: + * type: string + * claim_item_id: + * type: string + * url: + * type: string + * created_at: + * type: string + * format: date-time + * updated_at: + * type: string + * format: date-time + * deleted_at: + * type: string + * format: date-time + * metadata: + * type: object + */ diff --git a/packages/medusa/src/models/claim-item.ts b/packages/medusa/src/models/claim-item.ts index 4ac8302fb6..58b66391a7 100644 --- a/packages/medusa/src/models/claim-item.ts +++ b/packages/medusa/src/models/claim-item.ts @@ -109,3 +109,59 @@ export class ClaimItem { this.id = `citm_${id}` } } + +/** + * @schema claim_item + * title: "Claim Item" + * description: "Represents a claimed item along with information about the reasons for the claim." + * x-resourceId: claim_item + * properties: + * id: + * type: string + * images: + * type: array + * items: + * $ref: "#/components/schemas/claim_image" + * claim_order_id: + * type: string + * item_id: + * type: string + * item: + * description: "The Line Item that the claim refers to" + * $ref: "#/components/schemas/line_item" + * variant_id: + * type: string + * variant: + * description: "The Product Variant that is claimed." + * $ref: "#/components/schemas/product_variant" + * reason: + * description: "The reason for the claim" + * type: string + * enum: + * - missing_item + * - wrong_item + * - production_failure + * - other + * note: + * description: "An optional note about the claim, for additional information" + * type: string + * quantity: + * description: "The quantity of the item that is being claimed; must be less than or equal to the amount purchased in the original order." + * type: integer + * tags: + * description: "User defined tags for easy filtering and grouping." + * type: array + * items: + * $ref: "#/components/schemas/claim_tag" + * created_at: + * type: string + * format: date-time + * updated_at: + * type: string + * format: date-time + * deleted_at: + * type: string + * format: date-time + * metadata: + * type: object + */ diff --git a/packages/medusa/src/models/claim-order.ts b/packages/medusa/src/models/claim-order.ts index 910348b286..547245544f 100644 --- a/packages/medusa/src/models/claim-order.ts +++ b/packages/medusa/src/models/claim-order.ts @@ -147,3 +147,82 @@ export class ClaimOrder { this.id = `claim_${id}` } } + +/** + * @schema claim_order + * title: "Claim Order" + * description: "Claim Orders represent a group of faulty or missing items. Each claim order consists of a subset of items associated with an original order, and can contain additional information about fulfillments and returns." + * x-resourceId: claim_order + * properties: + * id: + * type: string + * type: + * type: string + * enum: + * - refund + * - replace + * payment_status: + * type: string + * enum: + * - na + * - not_refunded + * - refunded + * fulfillment_status: + * type: string + * enum: + * - not_fulfilled + * - partially_fulfilled + * - fulfilled + * - partially_shipped + * - shipped + * - partially_returned + * - returned + * - canceled + * - requires_action + * claim_items: + * description: "The items that have been claimed" + * type: array + * items: + * $ref: "#/components/schemas/claim_item" + * additional_items: + * description: "Refers to the new items to be shipped when the claim order has the type `replace`" + * type: array + * items: + * $ref: "#/components/schemas/line_item" + * order_id: + * description: "The id of the order that the claim comes from." + * type: string + * return_order: + * description: "Holds information about the return if the claim is to be returned" + * $ref: "#/components/schemas/return" + * shipping_address_id: + * description: "The id of the address that the new items should be shipped to" + * type: string + * shipping_address: + * description: "The address that the new items should be shipped to" + * $ref: "#/components/schemas/address" + * shipping_methods: + * description: "The shipping methods that the claim order will be shipped with." + * type: array + * items: + * $ref: "#/components/schemas/shipping_method" + * fulfillments: + * description: "The fulfillments of the new items to be shipped" + * type: array + * items: + * $ref: "#/components/schemas/fulfillment" + * refund_amount: + * description: "The amount that will be refunded in conjunction with the claim" + * type: integer + * created_at: + * type: string + * format: date-time + * updated_at: + * type: string + * format: date-time + * deleted_at: + * type: string + * format: date-time + * metadata: + * type: object + */ diff --git a/packages/medusa/src/models/claim-tag.ts b/packages/medusa/src/models/claim-tag.ts index b53d1627e5..d9bba794ae 100644 --- a/packages/medusa/src/models/claim-tag.ts +++ b/packages/medusa/src/models/claim-tag.ts @@ -41,3 +41,32 @@ export class ClaimTag { this.id = `ctag_${id}` } } + +/** + * @schema claim_tag + * title: "Claim Tag" + * description: "Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping." + * x-resourceId: claim_tag + * properties: + * id: + * description: "The id of the claim tag. Will be prefixed by `ctag_`." + * type: string + * value: + * description: "The value that the claim tag holds" + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * update_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/country.ts b/packages/medusa/src/models/country.ts index 495c0cc074..2928591cf6 100644 --- a/packages/medusa/src/models/country.ts +++ b/packages/medusa/src/models/country.ts @@ -41,3 +41,29 @@ export class Country { @JoinColumn({ name: "region_id" }) region: Region } + +/** + * @schema country + * title: "Country" + * description: "Country details" + * x-resourceId: country + * properties: + * id: + * description: "The database id of the country" + * type: integer + * iso_2: + * description: "The 2 character ISO code for the country." + * type: string + * iso_3: + * description: "The 3 character ISO code for the country." + * type: string + * num_code: + * description: "The numerical ISO code for the country." + * type: string + * name: + * description: "The normalized country name; in upper case." + * type: string + * display_name: + * description: "The country name appropriate for display." + * type: string + */ diff --git a/packages/medusa/src/models/currency.ts b/packages/medusa/src/models/currency.ts index 130c50608b..59df693707 100644 --- a/packages/medusa/src/models/currency.ts +++ b/packages/medusa/src/models/currency.ts @@ -14,3 +14,23 @@ export class Currency { @Column() name: string } + +/** + * @schema currency + * title: "Currency" + * description: "Currency" + * x-resourceId: currency + * properties: + * code: + * description: "The 3 character ISO code for the currency." + * type: string + * symbol: + * description: "The symbol used to indicate the currency." + * type: string + * symbol_native: + * description: "The native symbol used to indicate the currency." + * type: string + * name: + * description: "The written name of the currency" + * type: string + */ diff --git a/packages/medusa/src/models/customer.ts b/packages/medusa/src/models/customer.ts index a7933481b6..8591613f22 100644 --- a/packages/medusa/src/models/customer.ts +++ b/packages/medusa/src/models/customer.ts @@ -79,3 +79,44 @@ export class Customer { this.id = `cus_${id}` } } + +/** + * @schema customer + * title: "Customer" + * description: "Represents a customer" + * x-resourceId: customer + * properties: + * id: + * type: string + * email: + * type: string + * billing_address_id: + * type: string + * billing_address: + * description: "The Customer's billing address." + * anyOf: + * - $ref: "#/components/schemas/address" + * shipping_addresses: + * type: array + * items: + * $ref: "#/components/schemas/address" + * first_name: + * type: string + * last_name: + * type: string + * phone: + * type: string + * has_account: + * type: boolean + * created_at: + * type: string + * format: date-time + * updated_at: + * type: string + * format: date-time + * deleted_at: + * type: string + * format: date-time + * metadata: + * type: object + */ diff --git a/packages/medusa/src/models/discount-rule.ts b/packages/medusa/src/models/discount-rule.ts index aa2dc19732..1d42d7b4e4 100644 --- a/packages/medusa/src/models/discount-rule.ts +++ b/packages/medusa/src/models/discount-rule.ts @@ -85,3 +85,56 @@ export class DiscountRule { this.id = `dru_${id}` } } + +/** + * @schema discount_rule + * title: "Discount Rule" + * description: "Holds the rules that governs how a Discount is calculated when applied to a Cart." + * x-resourceId: discount_rule + * properties: + * id: + * description: "The id of the Discount Rule. Will be prefixed by `dru_`." + * type: string + * type: + * description: "The type of the Discount, can be `fixed` for discounts that reduce the price by a fixed amount, `percentage` for percentage reductions or `free_shipping` for shipping vouchers." + * type: string + * enum: + * - fixed + * - percentage + * - free_shipping + * description: + * description: "A short description of the discount" + * type: string + * value: + * description: "The value that the discount represents; this will depend on the type of the discount" + * type: integer + * allocation: + * description: "The scope that the discount should apply to." + * type: string + * enum: + * - total + * - item + * valid_for: + * description: "A set of Products that the discount can be used for." + * type: array + * items: + * $ref: "#/components/schemas/product" + * usage_limit: + * description: "The maximum number of times that a discount can be used." + * type: integer + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * update_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/discount.ts b/packages/medusa/src/models/discount.ts index 9229d6f6b1..2095808bcd 100644 --- a/packages/medusa/src/models/discount.ts +++ b/packages/medusa/src/models/discount.ts @@ -88,3 +88,58 @@ export class Discount { this.code = this.code.toUpperCase() } } + +/** + * @schema discount + * title: "Discount" + * description: "Represents a discount that can be applied to a cart for promotional purposes." + * x-resourceId: discount + * properties: + * id: + * description: "The id of the Discount. Will be prefixed by `disc_`." + * type: string + * code: + * description: "A unique code for the discount - this will be used by the customer to apply the discount" + * type: string + * is_dynamic: + * description: "A flag to indicate if multiple instances of the discount can be generated. I.e. for newsletter discounts" + * type: boolean + * rule: + * description: "The Discount Rule that governs the behaviour of the Discount" + * anyOf: + * - $ref: "#/components/schemas/discount_rule" + * is_disabled: + * description: "Whether the Discount has been disabled. Disabled discounts cannot be applied to carts" + * type: boolean + * parent_discount_id: + * description: "The Discount that the discount was created from. This will always be a dynamic discount" + * type: string + * starts_at: + * description: "The time at which the discount can be used." + * type: string + * format: date-time + * ends_at: + * description: "The time at which the discount can no longer be used." + * type: string + * format: date-time + * regions: + * description: "The Regions in which the Discount can be used" + * type: array + * items: + * $ref: "#/components/schemas/region" + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/fulfillment-item.ts b/packages/medusa/src/models/fulfillment-item.ts index 3e18f650b4..304fb5ea57 100644 --- a/packages/medusa/src/models/fulfillment-item.ts +++ b/packages/medusa/src/models/fulfillment-item.ts @@ -38,3 +38,24 @@ export class FulfillmentItem { @Column({ type: "int" }) quantity: number } + +/** + * @schema fulfillment_item + * title: "Fulfillment Item" + * description: "Correlates a Line Item with a Fulfillment, keeping track of the quantity of the Line Item." + * x-resourceId: fulfillment_item + * properties: + * fulfillment_id: + * description: "The id of the Fulfillment that the Fulfillment Item belongs to." + * type: string + * item_id: + * description: "The id of the Line Item that the Fulfillment Item references." + * type: string + * item: + * description: "The Line Item that the Fulfillment Item references." + * anyOf: + * - $ref: "#/components/schemas/line_item" + * quantity: + * description: "The quantity of the Line Item that is included in the Fulfillment." + * type: integer + */ diff --git a/packages/medusa/src/models/fulfillment-provider.ts b/packages/medusa/src/models/fulfillment-provider.ts index bc9c84f929..f7adbd8893 100644 --- a/packages/medusa/src/models/fulfillment-provider.ts +++ b/packages/medusa/src/models/fulfillment-provider.ts @@ -8,3 +8,17 @@ export class FulfillmentProvider { @Column({ default: true }) is_installed: boolean } + +/** + * @schema fulfillment_provider + * title: "Fulfillment Provider" + * description: "Represents a fulfillment provider plugin and holds its installation status." + * x-resourceId: fulfillment_provider + * properties: + * id: + * description: "The id of the fulfillment provider as given by the plugin." + * type: string + * is_installed: + * description: "Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`." + * type: boolean + */ diff --git a/packages/medusa/src/models/fulfillment.ts b/packages/medusa/src/models/fulfillment.ts index be6f4bb8f3..4f14943e90 100644 --- a/packages/medusa/src/models/fulfillment.ts +++ b/packages/medusa/src/models/fulfillment.ts @@ -115,3 +115,61 @@ export class Fulfillment { this.id = `ful_${id}` } } + +/** + * @schema fulfillment + * title: "Fulfillment" + * description: "Fulfillments are created once store operators can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a provider, which is typically an external shipping aggregator, shipping partner og 3PL, most plugins will have asynchronous communications with these providers through webhooks in order to automatically update and synchronize the state of Fulfillments." + * x-resourceId: fulfillment + * properties: + * id: + * description: "The id of the Fulfillment. This value will be prefixed by `ful_`." + * type: string + * claim_order_id: + * description: "The id of the Claim that the Fulfillment belongs to." + * type: string + * swap_id: + * description: "The id of the Swap that the Fulfillment belongs to." + * type: string + * order_id: + * description: "The id of the Order that the Fulfillment belongs to." + * type: string + * provider_id: + * description: "The id of the Fulfillment Provider responsible for handling the fulfillment" + * type: string + * items: + * description: "The Fulfillment Items in the Fulfillment - these hold information about how many of each Line Item has been fulfilled." + * type: array + * items: + * $ref: "#/components/schemas/fulfillment_item" + * tracking_links: + * description: "The Tracking Links that can be used to track the status of the Fulfillment, these will usually be provided by the Fulfillment Provider." + * type: array + * items: + * $ref: "#/components/schemas/tracking_link" + * tracking_numbers: + * deprecated: true + * description: "The tracking numbers that can be used to track the status of the fulfillment." + * type: array + * items: + * type: string + * shipped_at: + * description: "The date with timezone at which the Fulfillment was shipped." + * type: string + * format: date-time + * canceled_at: + * description: "The date with timezone at which the Fulfillment was canceled." + * type: string + * format: date-time + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/gift-card-transaction.ts b/packages/medusa/src/models/gift-card-transaction.ts index 53aadc3c4d..fa63ac5223 100644 --- a/packages/medusa/src/models/gift-card-transaction.ts +++ b/packages/medusa/src/models/gift-card-transaction.ts @@ -48,3 +48,31 @@ export class GiftCardTransaction { this.id = `gct_${id}` } } + +/** + * @schema gift_card_transaction + * title: "Gift Card Transaction" + * description: "Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order" + * x-resourceId: gift_card_transaction + * properties: + * id: + * description: "The id of the Gift Card Transaction. This value will be prefixed by `gct_`." + * type: string + * gift_card_id: + * description: "The id of the Gift Card that was used in the transaction." + * type: string + * gift_card: + * description: "The Gift Card that was used in the transaction." + * anyOf: + * - $ref: "#/components/schemas/gift_card" + * order_id: + * description: "The id of the Order that the Gift Card was used to pay for." + * type: string + * amount: + * description: "The amount that was used from the Gift Card." + * type: integer + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + */ diff --git a/packages/medusa/src/models/gift-card.ts b/packages/medusa/src/models/gift-card.ts index 9c0a04ce15..2fff7d4199 100644 --- a/packages/medusa/src/models/gift-card.ts +++ b/packages/medusa/src/models/gift-card.ts @@ -75,3 +75,55 @@ export class GiftCard { this.id = `gift_${id}` } } + +/** + * @schema gift_card + * title: "Gift Card" + * description: "Gift Cards are redeemable and represent a value that can be used towards the payment of an Order." + * x-resourceId: gift_card + * properties: + * id: + * description: "The id of the Gift Card. This value will be prefixed by `gift_`." + * type: string + * code: + * description: "The unique code that identifies the Gift Card. This is used by the Customer to redeem the value of the Gift Card." + * type: string + * value: + * description: "The value that the Gift Card represents." + * type: integer + * balance: + * description: "The remaining value on the Gift Card." + * type: integer + * region_id: + * description: "The id of the Region in which the Gift Card is available." + * type: string + * region: + * description: "The Region in which the Gift Card is available." + * anyOf: + * - $ref: "#/components/schemas/region" + * order_id: + * description: "The id of the Order that the Gift Card was purchased in." + * type: string + * is_disabled: + * description: "Whether the Gift Card has been disabled. Disabled Gift Cards cannot be applied to carts." + * type: boolean + * ends_at: + * description: "The time at which the Gift Card can no longer be used." + * type: string + * format: date-time + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/image.ts b/packages/medusa/src/models/image.ts index b63ad2880e..ee4391721a 100644 --- a/packages/medusa/src/models/image.ts +++ b/packages/medusa/src/models/image.ts @@ -36,3 +36,32 @@ export class Image { this.id = `img_${id}` } } + +/** + * @schema image + * title: "Image" + * description: "Images holds a reference to a URL at which the image file can be found." + * x-resourceId: image + * properties: + * id: + * description: "The id of the Image. This value will be prefixed by `img_`." + * type: string + * url: + * description: "The URL at which the image file can be found." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * update_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/line-item.ts b/packages/medusa/src/models/line-item.ts index 764fd14df8..3060050646 100644 --- a/packages/medusa/src/models/line-item.ts +++ b/packages/medusa/src/models/line-item.ts @@ -133,3 +133,80 @@ export class LineItem { this.id = `item_${id}` } } + +/** + * @schema line_item + * title: "Line Item" + * description: "Line Items represent purchasable units that can be added to a Cart for checkout. When Line Items are purchased they will get copied to the resulting 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 + * properties: + * id: + * description: "The id of the Line Item. This value will be prefixed by `item_`." + * type: string + * cart_id: + * description: "The id of the Cart that the Line Item belongs to." + * type: string + * order_id: + * description: "The id of the Order that the Line Item belongs to." + * type: string + * swap_id: + * description: "The id of the Swap that the Line Item belongs to." + * type: string + * claim_order_id: + * description: "The id of the Claim that the Line Item belongs to." + * type: string + * title: + * description: "The title of the Line Item, this should be easily identifiable by the Customer." + * type: string + * description: + * description: "A more detailed description of the contents of the Line Item." + * type: string + * thumbnail: + * description: "A URL string to a small image of the contents of the Line Item." + * type: string + * is_giftcard: + * description: "Flag to indicate if the Line Item is a Gift Card." + * type: boolean + * should_merge: + * description: "Flag to indicate if new Line Items with the same variant should be merged or added as an additional Line Item." + * type: boolean + * allow_discounts: + * description: "Flag to indicate if the Line Item should be included when doing discount calculations." + * type: boolean + * unit_price: + * description: "The price of one unit of the content in the Line Item. This should be in the currency defined by the Cart/Order/Swap/Claim that the Line Item belongs to." + * type: boolean + * variant_id: + * description: "The id of the Product Variant contained in the Line Item." + * type: string + * variant: + * description: "The Product Variant contained in the Line Item." + * anyOf: + * - $ref: "#/components/schemas/product_variant" + * quantity: + * description: "The quantity of the content in the Line Item." + * type: integer + * fulfilled_quantity: + * description: "The quantity of the Line Item that has been fulfilled." + * type: integer + * returned_quantity: + * description: "The quantity of the Line Item that has been returned." + * type: integer + * shipped_quantity: + * description: "The quantity of the Line Item that has been shipped." + * type: integer + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + * refundable: + * description: "The amount that can be refunded from the given Line Item. Takes taxes and discounts into consideration." + * type: integer + */ diff --git a/packages/medusa/src/models/money-amount.ts b/packages/medusa/src/models/money-amount.ts index fcc116486a..5f1268d501 100644 --- a/packages/medusa/src/models/money-amount.ts +++ b/packages/medusa/src/models/money-amount.ts @@ -71,3 +71,45 @@ export class MoneyAmount { this.id = `ma_${id}` } } + +/** + * @schema money_amount + * title: "Money Amount" + * description: "Money Amounts represents an amount that a given Product Variant can be purcased for. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based 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 + * properties: + * id: + * description: "The id of the Money Amount. This value will be prefixed by `ma_`." + * type: string + * currency_code: + * description: "The 3 character currency code that the Money Amount is given in." + * type: string + * amount: + * description: "The amount in the smallest currecny unit (e.g. cents 100 cents to charge $1) that the Product Variant will cost." + * type: integer + * sale_amount: + * description: "An optional sale amount that the Product Variant will be available for when defined." + * type: integer + * variant_id: + * description: "The id of the Product Variant that the Money Amount belongs to." + * type: string + * region_id: + * description: "The id of the Region that the Money Amount is defined for." + * type: string + * region: + * description: "The Region that the Money Amount is defined for." + * anyOf: + * - $ref: "#/components/schemas/region" + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + */ diff --git a/packages/medusa/src/models/notification-provider.ts b/packages/medusa/src/models/notification-provider.ts index 9adf7f8eed..6c392dbbb3 100644 --- a/packages/medusa/src/models/notification-provider.ts +++ b/packages/medusa/src/models/notification-provider.ts @@ -8,3 +8,17 @@ export class NotificationProvider { @Column({ default: true }) is_installed: boolean } + +/** + * @schema notification_provider + * title: "Notification Provider" + * description: "Represents a notification provider plugin and holds its installation status." + * x-resourceId: notification_provider + * properties: + * id: + * description: "The id of the notification provider as given by the plugin." + * type: string + * is_installed: + * description: "Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`." + * type: boolean + */ diff --git a/packages/medusa/src/models/notification.ts b/packages/medusa/src/models/notification.ts index 3cb9c74b6c..c83a66bb21 100644 --- a/packages/medusa/src/models/notification.ts +++ b/packages/medusa/src/models/notification.ts @@ -78,3 +78,95 @@ export class Notification { this.id = `noti_${id}` } } + +/** + * @schema notification + * title: "Notification" + * description: "Notifications a communications sent via Notification Providers as a reaction to internal events such as `order.placed`. Notifications can be used to show a chronological timeline for communications sent to a Customer regarding an Order, and enables resends." + * x-resourceId: notification + * properties: + * id: + * description: "The id of the Notification. This value will be prefixed by `noti_`." + * type: string + * event_name: + * description: "The name of the event that the notification was sent for." + * type: string + * resource_type: + * description: "The type of resource that the Notification refers to." + * type: string + * resource_id: + * description: "The id of the resource that the Notification refers to." + * type: string + * customer_id: + * description: "The id of the Customer that the Notification was sent to." + * type: string + * customer: + * description: "The Customer that the Notification was sent to." + * anyOf: + * - $ref: "#/components/schemas/customer" + * to: + * description: "The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id" + * type: string + * data: + * description: "The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend." + * type: object + * parent_id: + * description: "The id of the Notification that was originally sent." + * type: string + * resends: + * description: "The resends that have been completed after the original Notification." + * type: array + * items: + * $ref: "#/components/schemas/notification_resend" + * provider_id: + * description: "The id of the Notification Provider that handles the Notification." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + */ + +/** + * @schema notification_resend + * title: "Notification Resend" + * description: "A resend of a Notification." + * x-resourceId: notification_resend + * properties: + * id: + * description: "The id of the Notification. This value will be prefixed by `noti_`." + * type: string + * event_name: + * description: "The name of the event that the notification was sent for." + * type: string + * resource_type: + * description: "The type of resource that the Notification refers to." + * type: string + * resource_id: + * description: "The id of the resource that the Notification refers to." + * type: string + * to: + * description: "The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id" + * type: string + * data: + * description: "The data that the Notification was sent with. This contains all the data necessary for the Notification Provider to initiate a resend." + * type: object + * parent_id: + * description: "The id of the Notification that was originally sent." + * type: string + * provider_id: + * description: "The id of the Notification Provider that handles the Notification." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + */ diff --git a/packages/medusa/src/models/order.ts b/packages/medusa/src/models/order.ts index 213949f3bb..b930b5942e 100644 --- a/packages/medusa/src/models/order.ts +++ b/packages/medusa/src/models/order.ts @@ -257,3 +257,150 @@ export class Order { this.id = `order_${id}` } } + +/** + * @schema order + * title: "Order" + * description: "Represents an order" + * x-resourceId: order + * properties: + * id: + * type: string + * status: + * type: string + * enum: + * - pending + * - completed + * - archived + * - canceled + * - requires_action + * fulfillment_status: + * type: string + * enum: + * - not_fulfilled + * - partially_fulfilled + * - fulfilled + * - partially_shipped + * - shipped + * - partially_returned + * - returned + * - canceled + * - requires_action + * payment_status: + * type: string + * enum: + * - not_paid + * - awaiting + * - captured + * - partially_refunded + * - refuneded + * - canceled + * - requires_action + * display_id: + * type: integer + * cart_id: + * type: string + * currency_code: + * type: string + * tax_rate: + * type: integer + * discounts: + * type: array + * items: + * $ref: "#/components/schemas/discount" + * email: + * type: string + * billing_address_id: + * type: string + * billing_address: + * anyOf: + * - $ref: "#/components/schemas/address" + * shipping_address_id: + * type: string + * shipping_address: + * anyOf: + * - $ref: "#/components/schemas/address" + * items: + * type: array + * items: + * $ref: "#/components/schemas/line_item" + * region_id: + * type: string + * region: + * anyOf: + * - $ref: "#/components/schemas/region" + * gift_cards: + * type: array + * items: + * $ref: "#/components/schemas/gift_card" + * customer_id: + * type: string + * customer: + * anyOf: + * - $ref: "#/components/schemas/customer" + * payment_session: + * anyOf: + * - $ref: "#/components/schemas/payment_session" + * payment_sessions: + * type: array + * items: + * $ref: "#/components/schemas/payment_session" + * payments: + * type: array + * items: + * $ref: "#/components/schemas/payment" + * shipping_methods: + * type: array + * items: + * $ref: "#/components/schemas/shipping_method" + * fulfillments: + * type: array + * items: + * $ref: "#/components/schemas/fulfillment" + * returns: + * type: array + * items: + * $ref: "#/components/schemas/return" + * claims: + * type: array + * items: + * $ref: "#/components/schemas/claim_order" + * refunds: + * type: array + * items: + * $ref: "#/components/schemas/refund" + * swaps: + * type: array + * items: + * $ref: "#/components/schemas/refund" + * gift_card_transactions: + * type: array + * items: + * $ref: "#/components/schemas/gift_card_transaction" + * canceled_at: + * type: string + * format: date-time + * created_at: + * type: string + * format: date-time + * update_at: + * type: string + * format: date-time + * deleted_at: + * type: string + * format: date-time + * metadata: + * type: object + * shipping_total: + * type: integer + * discount_total: + * type: integer + * tax_total: + * type: integer + * subtotal: + * type: integer + * refundable_amount: + * type: integer + * gift_card_total: + * type: integer + */ diff --git a/packages/medusa/src/models/payment-provider.ts b/packages/medusa/src/models/payment-provider.ts index b68dc9f23e..8d60bed428 100644 --- a/packages/medusa/src/models/payment-provider.ts +++ b/packages/medusa/src/models/payment-provider.ts @@ -8,3 +8,17 @@ export class PaymentProvider { @Column({ default: true }) is_installed: boolean } + +/** + * @schema payment_provider + * title: "Payment Provider" + * description: "Represents a Payment Provider plugin and holds its installation status." + * x-resourceId: payment_provider + * properties: + * id: + * description: "The id of the payment provider as given by the plugin." + * type: string + * is_installed: + * description: "Whether the plugin is installed in the current version. Plugins that are no longer installed are not deleted by will have this field set to `false`." + * type: boolean + */ diff --git a/packages/medusa/src/models/payment-session.ts b/packages/medusa/src/models/payment-session.ts index 3705d7c300..a74a49b6e7 100644 --- a/packages/medusa/src/models/payment-session.ts +++ b/packages/medusa/src/models/payment-session.ts @@ -67,3 +67,43 @@ export class PaymentSession { this.id = `ps_${id}` } } + +/** + * @schema payment_session + * title: "Payment Session" + * description: "Payment Sessions are created when a Customer initilizes the checkout flow, and can be used to hold the state of a payment flow. Each Payment Session is controlled by a Payment Provider, who is responsible for the communication with external payment services. Authorized Payment Sessions will eventually get promoted to Payments to indicate that they are authorized for capture/refunds/etc." + * x-resourceId: payment_session + * properties: + * id: + * description: "The id of the Payment Session. This value will be prefixed with `ps_`." + * type: string + * cart_id: + * description: "The id of the Cart that the Payment Session is created for." + * type: string + * provider_id: + * description: "The id of the Payment Provider that is responsible for the Payment Session" + * type: string + * is_selected: + * description: "A flag to indicate if the Payment Session has been selected as the method that will be used to complete the purchase." + * type: boolean + * status: + * description: "Indicates the status of the Payment Session. Will default to `pending`, and will eventually become `authorized`. Payment Sessions may have the status of `requires_more` to indicate that further actions are to be completed by the Customer." + * type: string + * enum: + * - authorized + * - pending + * - requires_more + * - error + * - canceled + * data: + * description: "The data required for the Payment Provider to identify, modify and process the Payment Session. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state." + * type: object + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + */ diff --git a/packages/medusa/src/models/payment.ts b/packages/medusa/src/models/payment.ts index df0cc45c2e..84dafdf5a7 100644 --- a/packages/medusa/src/models/payment.ts +++ b/packages/medusa/src/models/payment.ts @@ -94,3 +94,57 @@ export class Payment { this.id = `pay_${id}` } } + +/** + * @schema payment + * title: "Payment" + * description: "Payments represent an amount authorized with a given payment method, Payments can be captured, canceled or refunded." + * x-resourceId: payment + * properties: + * id: + * description: "The id of the Payment. This value will be prefixed with `pay_`." + * type: string + * swap_id: + * description: "The id of the Swap that the Payment is used for." + * type: string + * order_id: + * description: "The id of the Order that the Payment is used for." + * type: string + * cart_id: + * description: "The id of the Cart that the Payment Session is created for." + * type: string + * amount: + * description: "The amount that the Payment has been authorized for." + * type: integer + * currency_code: + * description: "The 3 character ISO currency code that the Payment is completed in." + * type: string + * amount_refunded: + * description: "The amount of the original Payment amount that has been refunded back to the Customer." + * type: integer + * provider_id: + * description: "The id of the Payment Provider that is responsible for the Payment" + * type: string + * data: + * description: "The data required for the Payment Provider to identify, modify and process the Payment. Typically this will be an object that holds an id to the external payment session, but can be an empty object if the Payment Provider doesn't hold any state." + * type: object + * captured_at: + * description: "The date with timezone at which the Payment was captured." + * type: string + * format: date-time + * canceled_at: + * description: "The date with timezone at which the Payment was canceled." + * type: string + * format: date-time + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/product-collection.ts b/packages/medusa/src/models/product-collection.ts index 9dac2375f2..2f9e04f557 100644 --- a/packages/medusa/src/models/product-collection.ts +++ b/packages/medusa/src/models/product-collection.ts @@ -11,9 +11,10 @@ import { OneToMany, } from "typeorm" import { ulid } from "ulid" -import { Product } from "./product" import _ from "lodash" +import { Product } from "./product" + @Entity() export class ProductCollection { @PrimaryColumn() @@ -55,3 +56,40 @@ export class ProductCollection { } } } + +/** + * @schema product_collection + * title: "Product Collection" + * description: "Product Collections represents a group of Products that are related." + * x-resourceId: product_collection + * properties: + * id: + * description: "The id of the Product Collection. This value will be prefixed with `pcol_`." + * type: string + * title: + * description: "The title that the Product Collection is identified by." + * type: string + * handle: + * description: "A unique string that identifies the Product Collection - can for example be used in slug structures." + * type: string + * products: + * description: "The Products contained in the Product Collection." + * type: array + * items: + * type: object + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/product-option-value.ts b/packages/medusa/src/models/product-option-value.ts index 807a253416..c3564fdbd0 100644 --- a/packages/medusa/src/models/product-option-value.ts +++ b/packages/medusa/src/models/product-option-value.ts @@ -64,3 +64,38 @@ export class ProductOptionValue { this.id = `optval_${id}` } } + +/** + * @schema product_option_value + * title: "Product Option Value" + * 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 + * properties: + * id: + * description: "The id of the Product Option Value. This value will be prefixed with `optval_`." + * type: string + * value: + * description: "The value that the Product Variant has defined for the specific Product Option (e.g. if the Product Option is \"Size\" this value could be \"Small\", \"Medium\" or \"Large\")." + * type: string + * option_id: + * description: "The id of the Product Option that the Product Option Value is defined for." + * type: string + * variant_id: + * description: "The id of the Product Variant that the Product Option Value is defined for." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/product-option.ts b/packages/medusa/src/models/product-option.ts index e3a7207d46..999c65db32 100644 --- a/packages/medusa/src/models/product-option.ts +++ b/packages/medusa/src/models/product-option.ts @@ -58,3 +58,40 @@ export class ProductOption { this.id = `opt_${id}` } } + +/** + * @schema product_option + * title: "Product Option" + * description: "Product Options define properties that may vary between different variants of 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 + * properties: + * id: + * description: "The id of the Product Option. This value will be prefixed with `opt_`." + * type: string + * title: + * description: "The title that the Product Option is defined by (e.g. \"Size\")." + * type: string + * values: + * description: "The Product Option Values that are defined for the Product Option." + * type: array + * items: + * $ref: "#/components/schemas/product_option_value" + * product_id: + * description: "The id of the Product that the Product Option is defined for." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/product-tag.ts b/packages/medusa/src/models/product-tag.ts index ae93e89d48..bee519c157 100644 --- a/packages/medusa/src/models/product-tag.ts +++ b/packages/medusa/src/models/product-tag.ts @@ -36,3 +36,32 @@ export class ProductTag { this.id = `ptag_${id}` } } + +/** + * @schema product_tag + * title: "Product Tag" + * description: "Product Tags can be added to Products for easy filtering and grouping." + * x-resourceId: product_tag + * properties: + * id: + * description: "The id of the Product Tag. This value will be prefixed with `ptag_`." + * type: string + * value: + * description: "The value that the Product Tag represents (e.g. \"Pants\")." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/product-type.ts b/packages/medusa/src/models/product-type.ts index b274937d60..b03a43b542 100644 --- a/packages/medusa/src/models/product-type.ts +++ b/packages/medusa/src/models/product-type.ts @@ -36,3 +36,32 @@ export class ProductType { this.id = `ptyp_${id}` } } + +/** + * @schema product_type + * title: "Product Type" + * description: "Product Type can be added to Products for filtering and reporting purposes." + * x-resourceId: product_type + * properties: + * id: + * description: "The id of the Product Type. This value will be prefixed with `ptyp_`." + * type: string + * value: + * description: "The value that the Product Type represents (e.g. \"Clothing\")." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/product-variant.ts b/packages/medusa/src/models/product-variant.ts index c0eacaa772..7b97b6ea2a 100644 --- a/packages/medusa/src/models/product-variant.ts +++ b/packages/medusa/src/models/product-variant.ts @@ -121,3 +121,90 @@ export class ProductVariant { this.id = `variant_${id}` } } + +/** + * @schema product_variant + * title: "Product Variant" + * description: "Product Variants represent a Product with a specific set of Product Option 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 + * properties: + * id: + * description: "The id of the Product Variant. This value will be prefixed with `variant_`." + * type: string + * title: + * description: "A title that can be displayed for easy identification of the Product Variant." + * type: string + * product_id: + * description: "The id of the Product that the Product Variant belongs to." + * type: string + * prices: + * description: "The Money Amounts defined for the Product Variant. Each Money Amount represents a price in a given currency or a price in a specific Region." + * type: array + * items: + * $ref: "#/components/schemas/money_amount" + * sku: + * description: "The unique stock keeping unit used to identify the Product Variant. This will usually be a unqiue identifer for the item that is to be shipped, and can be referenced across multiple systems." + * type: string + * barcode: + * description: "A generic field for a GTIN number that can be used to identify the Product Variant." + * type: string + * ean: + * description: "An EAN barcode number that can be used to identify the Product Variant." + * type: string + * upc: + * description: "A UPC barcode number that can be used to identify the Product Variant." + * type: string + * inventory_quantity: + * description: "The current quantity of the item that is stocked." + * type: integer + * allow_backorder: + * description: "Whether the Product Variant should be purchasable when `inventory_quantity` is 0." + * type: boolean + * manage_inventory: + * description: "Whether Medusa should manage inventory for the Product Variant." + * type: boolean + * hs_code: + * description: "The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * origin_country: + * description: "The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * mid_code: + * description: "The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * material: + * description: "The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * weight: + * description: "The weight of the Product Variant. May be used in shipping rate calculations." + * type: string + * height: + * description: "The height of the Product Variant. May be used in shipping rate calculations." + * type: string + * width: + * description: "The width of the Product Variant. May be used in shipping rate calculations." + * type: string + * length: + * description: "The length of the Product Variant. May be used in shipping rate calculations." + * type: string + * options: + * description: "The Product Option Values specified for the Product Variant." + * type: array + * items: + * $ref: "#/components/schemas/product_option_value" + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/product.ts b/packages/medusa/src/models/product.ts index 3aeaf8eb27..2fb5a58e57 100644 --- a/packages/medusa/src/models/product.ts +++ b/packages/medusa/src/models/product.ts @@ -159,3 +159,102 @@ export class Product { } } } + +/** + * @schema product + * title: "Product" + * description: "Products are a grouping of Product Variants that have common properties such as images and descriptions. Products can have multiple options which define the properties that Product Variants differ by." + * x-resourceId: product + * properties: + * id: + * description: "The id of the Product. This value will be prefixed with `prod_`." + * type: string + * title: + * description: "A title that can be displayed for easy identification of the Product." + * type: string + * subtitle: + * description: "An optional subtitle that can be used to further specify the Product." + * type: string + * description: + * description: "A short description of the Product." + * type: string + * handle: + * description: "A unique identifier for the Product (e.g. for slug structure)." + * type: string + * is_giftcard: + * description: "Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased." + * type: boolean + * images: + * description: "Images of the Product" + * type: array + * items: + * $ref: "#/components/schemas/image" + * thumbnail: + * description: "A URL to an image file that can be used to identify the Product." + * type: string + * options: + * description: "The Product Options that are defined for the Product. Product Variants of the Product will have a unique combination of Product Option Values." + * type: array + * items: + * $ref: "#/components/schemas/product_option" + * variants: + * description: "The Product Variants that belong to the Product. Each will have a unique combination of Product Option Values." + * type: array + * items: + * $ref: "#/components/schemas/product_variant" + * profile_id: + * description: "The id of the Shipping Profile that the Product belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products." + * type: string + * hs_code: + * description: "The Harmonized System code of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * origin_country: + * description: "The country in which the Product Variant was produced. May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * mid_code: + * description: "The Manufacturers Identification code that identifies the manufacturer of the Product Variant. May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * material: + * description: "The material and composition that the Product Variant is made of, May be used by Fulfillment Providers to pass customs information to shipping carriers." + * type: string + * weight: + * description: "The weight of the Product Variant. May be used in shipping rate calculations." + * type: string + * height: + * description: "The height of the Product Variant. May be used in shipping rate calculations." + * type: string + * width: + * description: "The width of the Product Variant. May be used in shipping rate calculations." + * type: string + * length: + * description: "The length of the Product Variant. May be used in shipping rate calculations." + * type: string + * type: + * description: "The Product Type of the Product (e.g. \"Clothing\")" + * anyOf: + * - $ref: "#/components/schemas/product_type" + * collection: + * description: "The Product Collection that the Product belongs to (e.g. \"SS20\")" + * anyOf: + * - $ref: "#/components/schemas/product_collection" + * tags: + * description: "The Product Tags assigned to the Product." + * type: array + * items: + * $ref: "#/components/schemas/product_tag" + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/refund.ts b/packages/medusa/src/models/refund.ts index 9f2f7efe0f..1cff9e4d74 100644 --- a/packages/medusa/src/models/refund.ts +++ b/packages/medusa/src/models/refund.ts @@ -67,3 +67,43 @@ export class Refund { this.id = `ref_${id}` } } + +/** + * @schema refund + * title: "Refund" + * description: "Refund represent an amount of money transfered back to the Customer for a given reason. Refunds may occur in relation to Returns, Swaps and Claims, but can also be initiated by a store operator." + * x-resourceId: refund + * properties: + * id: + * description: "The id of the Refund. This value will be prefixed with `ref_`." + * type: string + * order_id: + * description: "The id of the Order that the Refund is related to." + * type: string + * amount: + * description: "The amount that has be refunded to the Customer." + * type: integer + * note: + * description: "An optional note explaining why the amount was refunded." + * type: string + * reason: + * description: "The reason given for the Refund, will automatically be set when processed as part of a Swap, Claim or Return." + * type: string + * enum: + * - discount + * - return + * - swap + * - claim + * - other + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/region.ts b/packages/medusa/src/models/region.ts index eb244cb334..225ab2507a 100644 --- a/packages/medusa/src/models/region.ts +++ b/packages/medusa/src/models/region.ts @@ -93,3 +93,56 @@ export class Region { this.id = `reg_${id}` } } + +/** + * @schema region + * title: "Region" + * description: "Regions hold settings for how Customers in a given geographical location shop. The is, for example, where currencies and tax rates are defined. A Region can consist of multiple countries to accomodate common shopping settings across countries." + * x-resourceId: region + * properties: + * id: + * description: "The id of the Region. This value will be prefixed with `reg_`." + * type: string + * name: + * description: "The name of the region as displayed to the customer. If the Region only has one country it is recommended to write the country name." + * type: string + * currency_code: + * description: "The 3 character ISO currency code that Customers will shop in in the Region." + * type: string + * tax_rate: + * description: "The tax rate that should be charged on purchases in the Region." + * type: number + * tax_code: + * description: "The tax code used on purchases in the Region. This may be used by other systems for accounting purposes." + * type: string + * countries: + * description: "The countries that are included in the Region." + * type: array + * items: + * $ref: "#/components/schemas/country" + * payment_providers: + * description: "The Payment Providers that can be used to process Payments in the Region." + * type: array + * items: + * $ref: "#/components/schemas/payment_provider" + * fulfillment_providers: + * description: "The Fulfillment Providers that can be used to fulfill orders in the Region." + * type: array + * items: + * $ref: "#/components/schemas/fulfillment_provider" + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/return-item.ts b/packages/medusa/src/models/return-item.ts index 35e913534a..28c89ea70c 100644 --- a/packages/medusa/src/models/return-item.ts +++ b/packages/medusa/src/models/return-item.ts @@ -50,3 +50,36 @@ export class ReturnItem { @Column({ type: "jsonb", nullable: true }) metadata: any } + +/** + * @schema return_item + * title: "Return Item" + * 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 + * properties: + * return_id: + * description: "The id of the Return that the Return Item belongs to." + * type: string + * item_id: + * description: "The id of the Line Item that the Return Item references." + * type: string + * item: + * description: "The Line Item that the Return Item references." + * anyOf: + * - $ref: "#/components/schemas/line_item" + * quantity: + * description: "The quantity of the Line Item that is included in the Return." + * type: integer + * is_requested: + * description: "Whether the Return Item was requested initially or received unexpectedly in the warehouse." + * type: boolean + * requested_quantity: + * description: "The quantity that was originally requested to be returned." + * type: integer + * recieved_quantity: + * description: "The quantity that was received in the warehouse." + * type: integer + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/return.ts b/packages/medusa/src/models/return.ts index da019b44c1..77cd1d2837 100644 --- a/packages/medusa/src/models/return.ts +++ b/packages/medusa/src/models/return.ts @@ -112,3 +112,60 @@ export class Return { this.id = `ret_${id}` } } + +/** + * @schema return + * title: "Return" + * description: "Return orders hold information about Line Items that a Customer wishes to send back, along with how the items will be returned. Returns can be used as part of a Swap." + * x-resourceId: return + * properties: + * id: + * description: "The id of the Return. This value will be prefixed with `ret_`." + * type: string + * status: + * description: "Status of the Return." + * type: string + * enum: + * - requested + * - received + * - requires_action + * items: + * description: "The Return Items that will be shipped back to the warehouse. + * type: array + * items: + * $ref: "#/components/schemas/return_item" + * swap_id: + * description: "The id of the Swap that the Return is a part of." + * type: string + * order_id: + * description: "The id of the Order that the Return is made from." + * type: string + * claim_order_id: + * description: "The id of the Claim that the Return is a part of." + * type: string + * shipping_method: + * description: "The Shipping Method that will be used to send the Return back. Can be null if the Customer facilitates the return shipment themselves." + * anyOf: + * - $ref: "#/components/schemas/shipping_method" + * shipping_data: + * description: "Data about the return shipment as provided by the Fulfilment Provider that handles the return shipment." + * type: object + * refund_amount: + * description: "The amount that should be refunded as a result of the return." + * type: integer + * received_at: + * description: "The date with timezone at which the return was received." + * type: string + * format: date-time + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/shipping-method.ts b/packages/medusa/src/models/shipping-method.ts index 19af8cae18..923e532f7a 100644 --- a/packages/medusa/src/models/shipping-method.ts +++ b/packages/medusa/src/models/shipping-method.ts @@ -91,3 +91,42 @@ export class ShippingMethod { this.id = `sm_${id}` } } + +/** + * @schema shipping_method + * title: "Shipping Method" + * description: "Shipping Methods represent a way in which an Order or Return can be shipped. Shipping Methods are built from a Shipping Option, but may contain additional details, that can be necessary for the Fulfillment Provider to handle the shipment." + * x-resourceId: shipping_method + * properties: + * id: + * description: "The id of the Shipping Method. This value will be prefixed with `sm_`." + * type: string + * shipping_option_id: + * description: "The id of the Shipping Option that the Shipping Method is built from." + * type: string + * shipping_option: + * description: "The Shipping Option that the Shipping Method is built from." + * anyOf: + * - $ref: "#/components/schemas/shipping_option" + * order_id: + * description: "The id of the Order that the Shipping Method is used on." + * type: string + * return_id: + * description: "The id of the Return that the Shipping Method is used on." + * type: string + * swap_id: + * description: "The id of the Swap that the Shipping Method is used on." + * type: string + * cart_id: + * description: "The id of the Cart that the Shipping Method is used on." + * type: string + * claim_order_id: + * description: "The id of the Claim that the Shipping Method is used on." + * type: string + * price: + * description: "The amount to charge for the Shipping Method. The currency of the price is defined by the Region that the Order that the Shipping Method belongs to is a part of." + * type: integer + * data: + * description: "Additional data that the Fulfillment Provider needs to fulfill the shipment. This is used in combination with the Shipping Options data, and may contain information such as a drop point id." + * type: object + */ diff --git a/packages/medusa/src/models/shipping-option-requirement.ts b/packages/medusa/src/models/shipping-option-requirement.ts index 78b11c02db..4417ca568b 100644 --- a/packages/medusa/src/models/shipping-option-requirement.ts +++ b/packages/medusa/src/models/shipping-option-requirement.ts @@ -50,3 +50,26 @@ export class ShippingOptionRequirement { this.id = `sor_${id}` } } + +/** + * @schema shipping_option_requirement + * title: "Shipping Option Requirement" + * description: "A requirement that a Cart must satisfy for the Shipping Option to be available to the Cart." + * x-resourceId: shipping_option_requirement + * properties: + * id: + * description: "The id of the Shipping Option Requirement. This value will be prefixed with `sor_`." + * type: string + * shipping_option_id: + * description: "The id of the Shipping Option that the Shipping Option Requirement belongs to." + * type: string + * type: + * description: "The type of the requirement, this defines how the value will be compared to the Cart's total. `min_subtotal` requirements define the minimum subtotal that is needed for the Shipping Option to be available, while the `max_subtotal` defines the maximum subtotal that the Cart can have for the Shipping Option to be available." + * type: string + * enum: + * - min_subtotal + * - max_subtotal + * amount: + * description: "The amount to compare the Cart subtotal to." + * type: integer + */ diff --git a/packages/medusa/src/models/shipping-option.ts b/packages/medusa/src/models/shipping-option.ts index 63a22b1722..56432ba421 100644 --- a/packages/medusa/src/models/shipping-option.ts +++ b/packages/medusa/src/models/shipping-option.ts @@ -99,3 +99,65 @@ export class ShippingOption { this.id = `so_${id}` } } + +/** + * @schema shipping_option + * title: "Shipping Option" + * description: "Shipping Options represent a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information." + * x-resourceId: shipping_option + * properties: + * id: + * description: "The id of the Shipping Option. This value will be prefixed with `so_`." + * type: string + * name: + * description: "The name given to the Shipping Option - this may be displayed to the Customer." + * type: string + * region_id: + * description: "The id of the Region that the Shipping Option belongs to." + * type: string + * region: + * description: "The id of the Region that the Shipping Option belongs to." + * anyOf: + * - $ref: "#/components/schemas/region" + * profile_id: + * description: "The id of the Shipping Profile that the Shipping Option belongs to. Shipping Profiles have a set of defined Shipping Options that can be used to Fulfill a given set of Products." + * type: string + * provider_id: + * description: "The id of the Fulfillment Provider, that will be used to process Fulfillments from the Shipping Option." + * type: string + * price_type: + * description: "The type of pricing calculation that is used when creatin Shipping Methods from the Shipping Option. Can be `flat_rate` for fixed prices or `calculated` if the Fulfillment Provider can provide price calulations." + * type: string + * enum: + * - flat_rate + * - calculated + * amount: + * description: "The amount to charge for shipping when the Shipping Option price type is `flat_rate`." + * type: integer + * is_return: + * description: "Flag to indicate if the Shipping Option can be used for Return shipments." + * type: boolean + * requirements: + * description: "The requirements that must be satisfied for the Shipping Option to be available for a Cart." + * type: array + * items: + * $ref: "#/components/schemas/shipping_option_requirement" + * data: + * description: "The data needed for the Fulfillment Provider to identify the Shipping Option." + * type: object + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/shipping-profile.ts b/packages/medusa/src/models/shipping-profile.ts index f5c22c34c4..b9bb365470 100644 --- a/packages/medusa/src/models/shipping-profile.ts +++ b/packages/medusa/src/models/shipping-profile.ts @@ -67,3 +67,50 @@ export class ShippingProfile { this.id = `sp_${id}` } } + +/** + * @schema shipping_profile + * title: "Shipping Profile" + * description: "Shipping Profiles have a set of defined Shipping Options that can be used to fulfill a given set of Products." + * x-resourceId: shipping_profile + * properties: + * id: + * description: "The id of the Shipping Profile. This value will be prefixed with `sp_`." + * type: string + * name: + * description: "The name given to the Shipping profile - this may be displayed to the Customer." + * type: string + * type: + * description: "The type of the Shipping Profile, may be `default`, `gift_card` or `custom`." + * type: string + * enum: + * - default + * - gift_card + * - custom + * products: + * description: "The Products that the Shipping Profile defines Shipping Options for." + * type: array + * items: + * $ref: "#/components/schemas/product" + * shipping_options: + * description: "The Shipping Options that can be used to fulfill the Products in the Shipping Profile." + * type: array + * items: + * anyOf: + * - $ref: "#/components/schemas/shipping_option" + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/store.ts b/packages/medusa/src/models/store.ts index 1b03e7e5e1..ea2983de52 100644 --- a/packages/medusa/src/models/store.ts +++ b/packages/medusa/src/models/store.ts @@ -65,3 +65,39 @@ export class Store { this.id = `store_${id}` } } + +/** + * @schema store + * title: "Store" + * description: "Holds settings for the Store, such as name, currencies, etc." + * x-resourceId: store + * properties: + * id: + * description: "The id of the Store. This value will be prefixed with `store_`." + * type: string + * name: + * description: "The name of the Store - this may be displayed to the Customer." + * type: string + * default_currency_code: + * description: "The default currency code used when no other currency code is specified." + * type: string + * currencies: + * description: "The currencies that are enabled for the Store." + * type: array + * items: + * $ref: "#/components/schemas/currency" + * swap_link_template: + * description: "A template to generate Swap links from use {{cart_id}} to include the Swap's `cart_id` in the link." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/swap.ts b/packages/medusa/src/models/swap.ts index 981b4e11c4..606bdfade7 100644 --- a/packages/medusa/src/models/swap.ts +++ b/packages/medusa/src/models/swap.ts @@ -143,3 +143,88 @@ export class Swap { this.id = `swap_${id}` } } + +/** + * @schema swap + * title: "Swap" + * description: "Swaps can be created when a Customer wishes to exchange Products that they have purchased to different Products. Swaps consist of a Return of previously purchased Products and a Fulfillment of new Products, the amount paid for the Products being returned will be used towards payment for the new Products. In the case where the amount paid for the the Products being returned exceed the amount to be paid for the new Products, a Refund will be issued for the difference." + * x-resourceId: swap + * properties: + * id: + * description: "The id of the Swap. This value will be prefixed with `swap_`." + * type: string + * fulfillment_status: + * description: "The status of the Fulfillment of the Swap." + * type: string + * enum: + * - not_fulfilled + * - partially_fulfilled + * - fulfilled + * - partially_shipped + * - shipped + * - partially_returned + * - returned + * - canceled + * - requires_action + * payment_status: + * description: "The status of the Payment of the Swap. The payment may either refer to the refund of an amount or the authorization of a new amount." + * type: string + * enum: + * - not_paid + * - awaiting + * - captured + * - canceled + * - difference_refunded + * - requires_action + * order_id: + * description: "The id of the Order where the Line Items to be returned where purchased." + * type: string + * additional_items: + * description: "The new Line Items to ship to the Customer." + * type: array + * items: + * $ref: "#/components/schemas/line_item" + * return_order: + * description: "The Return that is issued for the return part of the Swap." + * anyOf: + * - $ref: "#/components/schemas/return" + * fulfillments: + * description: "The Fulfillments used to send the new Line Items." + * type: array + * items: + * $ref: "#/components/schemas/fulfillment" + * payment: + * description: "The Payment authorized when the Swap requires an additional amount to be charged from the Customer." + * anyOf: + * - $ref: "#/components/schemas/payment" + * difference_due: + * description: "The difference that is paid or refunded as a result of the Swap. May be negative when the amount paid for the returned items exceed the total of the new Products." + * type: integer + * shipping_address: + * description: "The Address to send the new Line Items to - in most cases this will be the same as the shipping address on the Order." + * anyOf: + * - $ref: "#/components/schemas/address" + * shipping_methods: + * description: "The Shipping Methods used to fulfill the addtional items purchased." + * type: array + * items: + * $ref: "#/components/schemas/shipping_method" + * cart_id: + * description: "The id of the Cart that the Customer will use to confirm the Swap." + * type: string + * confirmed_at: + * description: "The date with timezone at which the Swap was confirmed by the Customer." + * type: string + * format: date-time + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/tracking-link.ts b/packages/medusa/src/models/tracking-link.ts index ded8e9bc1e..b245127d35 100644 --- a/packages/medusa/src/models/tracking-link.ts +++ b/packages/medusa/src/models/tracking-link.ts @@ -61,3 +61,38 @@ export class TrackingLink { this.id = `tlink_${id}` } } + +/** + * @schema tracking_link + * title: "Tracking Link" + * description: "Tracking Link holds information about tracking numbers for a Fulfillment. Tracking Links can optionally contain a URL that can be visited to see the status of the shipment." + * x-resourceId: tracking_link + * properties: + * id: + * description: "The id of the Tracking Link. This value will be prefixed with `tlink_`." + * type: string + * url: + * description: "The URL at which the status of the shipment can be tracked." + * type: string + * tracking_number: + * description: "The tracking number given by the shipping carrier." + * type: string + * fulfillment_id: + * description: "The id of the Fulfillment that the Tracking Link references." + * type: string + * created_at: + * description: "The date with timezone at which the resource was created." + * type: string + * format: date-time + * updated_at: + * description: "The date with timezone at which the resource was last updated." + * type: string + * format: date-time + * deleted_at: + * description: "The date with timezone at which the resource was deleted." + * type: string + * format: date-time + * metadata: + * description: "An optional key-value map with additional information." + * type: object + */ diff --git a/packages/medusa/src/models/user.ts b/packages/medusa/src/models/user.ts index 9251e001c4..912dd32544 100644 --- a/packages/medusa/src/models/user.ts +++ b/packages/medusa/src/models/user.ts @@ -50,3 +50,34 @@ export class User { this.id = `usr_${id}` } } + +/** + * @schema user + * title: "User" + * description: "Represents a User who can manage store settings." + * x-resourceId: user + * properties: + * id: + * description: "The unique id of the User. This will be prefixed with `usr_`" + * type: string + * email: + * description: "The email of the User" + * type: string + * first_name: + * type: string + * last_name: + * description: "The Customer's billing address." + * anyOf: + * - $ref: "#/components/schemas/address" + * created_at: + * type: string + * format: date-time + * updated_at: + * type: string + * format: date-time + * deleted_at: + * type: string + * format: date-time + * metadata: + * type: object + */ diff --git a/scripts/build-openapi.js b/scripts/build-openapi.js new file mode 100755 index 0000000000..fcccf6936c --- /dev/null +++ b/scripts/build-openapi.js @@ -0,0 +1,59 @@ +#!/usr/bin/env node + +const fs = require("fs"); +const OAS = require("oas-normalize"); +const swaggerInline = require("swagger-inline"); + +// Storefront API +swaggerInline( + ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/store"], + { + base: "./docs/api/store-spec3-base.json", + } +).then((gen) => { + const oas = new OAS(gen); + oas.validate((err, genObj) => { + if (err) { + console.error(err); + return; + } + fs.writeFileSync("./docs/api/store-spec3.json", JSON.stringify(genObj)); + }, true); +}); + +swaggerInline( + ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/store"], + { + base: "./docs/api/store-spec3-base.json", + format: "yaml", + } +).then((gen) => { + fs.writeFileSync("./docs/api/store-spec3.yaml", gen); +}); + +// Admin API +swaggerInline( + ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/admin"], + { + base: "./docs/api/admin-spec3-base.json", + } +).then((gen) => { + const oas = new OAS(gen); + oas.validate((err, genObj) => { + if (err) { + console.error(err); + return; + } + fs.writeFileSync("./docs/api/admin-spec3.json", JSON.stringify(genObj)); + }, true); +}); + +swaggerInline( + ["./packages/medusa/src/models", "./packages/medusa/src/api/routes/admin"], + { + base: "./docs/api/admin-spec3-base.json", + format: "yaml", + } +).then((gen) => { + fs.writeFileSync("./docs/api/admin-spec3.yaml", gen); +}); diff --git a/scripts/generate-fixtures.sh b/scripts/generate-fixtures.sh new file mode 100755 index 0000000000..a9fb0d0a9d --- /dev/null +++ b/scripts/generate-fixtures.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +FIXTURE_PATTERN=$1 + +lerna run build + +cd docs-util/fixture-gen + +yarn +yarn link @medusajs/medusa medusa-interfaces + +cd ../.. + +if [ "$FIXTURE_PATTERN" ]; then + yarn test:fixtures -t $FIXTURE_PATTERN +else + yarn test:fixtures +fi + diff --git a/www/gatsby-config.js b/www/gatsby-config.js index da3e9e907d..383df420d5 100644 --- a/www/gatsby-config.js +++ b/www/gatsby-config.js @@ -21,5 +21,11 @@ module.exports = { path: `${__dirname}/../docs/api/store`, }, }, + { + resolve: `gatsby-source-filesystem`, + options: { + path: `${__dirname}/../docs/api`, + }, + }, ], } diff --git a/www/package.json b/www/package.json index 93cc562e42..759785b393 100644 --- a/www/package.json +++ b/www/package.json @@ -16,6 +16,7 @@ "dependencies": { "@emotion/react": "^11.1.2", "@emotion/styled": "^11.0.0", + "@rebass/forms": "^4.0.6", "emotion-theming": "^10.0.27", "gatsby": "^2.24.66", "gatsby-plugin-anchor-links": "^1.1.1", diff --git a/www/src/components/docs-reader.js b/www/src/components/docs-reader.js new file mode 100644 index 0000000000..a172a2c018 --- /dev/null +++ b/www/src/components/docs-reader.js @@ -0,0 +1,88 @@ +import React from "react" +import { Flex, Box, Text } from "rebass" +import styled from "@emotion/styled" +import Markdown from "react-markdown" + +import RouteSection from "./route-section" +import JsonBox from "./json-box" +import EndpointOverview from "./endpoint-overview" +import Parameters from "./parameters" + +const convertToKebabCase = string => { + return string.replace(/\s+/g, "-").toLowerCase() +} + +const EndpointContainer = styled(Flex)` + min-height: 90vh; + position: relative; + border-top: hairline; + + code { + background-color: #e3e8ee; + border-radius: 5px; + padding: 4px; + } +` + +const DocsReader = ({ tags, spec }) => { + return ( + + {Object.entries(tags).map(([tagName, endpoints]) => ( + + + + + + + {endpoints.map((endpoint, i) => ( + + + + {endpoint.summary} + + + {endpoint.description} + + + + + + + ))} + + + + + + ))} + + ) +} + +export default DocsReader diff --git a/www/src/components/endpoint-overview.js b/www/src/components/endpoint-overview.js new file mode 100644 index 0000000000..0ebad54a15 --- /dev/null +++ b/www/src/components/endpoint-overview.js @@ -0,0 +1,65 @@ +import React from "react" +import { Flex, Box, Text } from "rebass" + +import RoutesOverview from "./routes-overview" +import ParamSection from "./param-section" +import JsonBox from "./json-box" + +const EndpointOverview = ({ title, description, routes, spec }) => { + let schema = {} + let attrs = [] + let resourceId + + if (spec) { + const tag = spec.tags.find(t => t.name === title) + + if (tag && tag["x-resourceId"]) { + resourceId = tag["x-resourceId"] + schema = spec.components.schemas[tag["x-resourceId"]] + + for (const [name, details] of Object.entries(schema.properties)) { + if (!attrs.find(a => a.name === name)) { + attrs.push({ + name, + ...details, + }) + } + } + } + } + + return ( + + + + {title} + + {description || schema.description} + {attrs.length > 0 && ( + + Attributes + {attrs.map(p => ( + + ))} + + )} + + + {routes && } + {resourceId && } + + + ) +} + +export default EndpointOverview diff --git a/www/src/components/json-box.js b/www/src/components/json-box.js new file mode 100644 index 0000000000..83308ae627 --- /dev/null +++ b/www/src/components/json-box.js @@ -0,0 +1,88 @@ +import React, { useState, useEffect } from "react" +import { graphql } from "gatsby" +import { Flex, Box, Text, Image } from "rebass" +import styled from "@emotion/styled" +import { AnchorLink } from "gatsby-plugin-anchor-links" +import Markdown from "react-markdown" +import Highlight from "react-highlight.js" + +import "highlight.js/styles/a11y-light.css" + +import fixtures from "../../../docs/api/fixtures.json" + +export const ResponseContainer = styled(Flex)` + border: 1px solid #e3e8ee; + border-radius: 5px; + margin-left: auto; + margin-right: auto; + width: 100%; + max-height: calc(90vh - 20px); + overflow-y: scroll; + align-self: flex-start; + font-size: 1; + position: sticky; + top: 20px; + + code { + background: #f7fafc !important; + } +` + +const JsonBox = ({ text, resourceId, endpoint }) => { + const [json, setJson] = useState({}) + + useEffect(() => { + const toSet = {} + if (endpoint) { + const props = + endpoint?.responses?.["200"]?.content?.["application/json"]?.schema + ?.properties + + if (props) { + for (const [name, details] of Object.entries(props)) { + if ( + details["x-resourceId"] && + details["x-resourceId"] in fixtures.resources + ) { + toSet[name] = fixtures.resources[details["x-resourceId"]] + } else { + toSet[name] = details + } + } + } + } + + if (resourceId) { + setJson(fixtures.resources[resourceId]) + } else { + setJson(toSet) + } + }, []) + + return ( + + + {text || "RESPONSE"} + + + + {JSON.stringify(json, undefined, 2)} + + + + ) +} + +export default JsonBox diff --git a/www/src/components/param-section.js b/www/src/components/param-section.js new file mode 100644 index 0000000000..cdec65b4a9 --- /dev/null +++ b/www/src/components/param-section.js @@ -0,0 +1,145 @@ +import React from "react" +import styled from "@emotion/styled" +import { Flex, Box, Text } from "rebass" +import Markdown from "react-markdown" +import Collapsible from "react-collapsible" + +const ExpandContainer = styled.div` + .child-attrs { + cursor: pointer; + font-size: 12px; + box-sizing: border-box; + padding-left: 10px; + padding-right: 10px; + width: max-content; + border-radius: 5px; + border: 1px solid #e3e8ee; + color: #afafaf; + + &:hover { + color: #212121; + } + } + .child-attrs.is-open { + width: 100%; + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + } +` + +const Expand = ({ schema }) => { + const properties = schema.properties + + let aggregated = [] + for (const [name, details] of Object.entries(properties)) { + if (!aggregated.find(a => a.name === name)) { + aggregated.push({ + name, + ...details, + }) + } + } + + return ( + + + + {schema.title} + {aggregated.map(param => { + let type = param.type + if (!type && param.schema) { + type = param.schema.type + } + return ( + + + + {param.name} + + + {type} + + {param.required && ( + + required + + )} + + + {param.description} + + + ) + })} + + + + ) +} + +const ParamSection = ({ routeParam, param }) => { + let type = param.type + if (!type && param.schema) { + type = param.schema.type + } + + return ( + + + + {param.name} + + + {type} + + {(param.required || routeParam) && ( + + required + + )} + + + {param.description} + + {param.anyOf && param.anyOf.map(schema => )} + {param.oneOf && param.oneOf.map(schema => )} + {param.type === "array" && param.items?.properties && ( + + )} + + ) +} + +export default ParamSection diff --git a/www/src/components/parameters.js b/www/src/components/parameters.js new file mode 100644 index 0000000000..99f542e907 --- /dev/null +++ b/www/src/components/parameters.js @@ -0,0 +1,41 @@ +import React from "react" +import { Flex, Box, Text } from "rebass" + +import ParamSection from "./param-section" + +const Parameters = ({ endpoint }) => { + const aggregated = endpoint.parameters || [] + + const reqBody = endpoint.requestBody || {} + const props = reqBody.content?.["application/json"]?.schema?.properties + if (props) { + for (const [name, details] of Object.entries(props)) { + if (!aggregated.find(a => a.name === name)) { + aggregated.push({ + name, + ...details, + }) + } + } + } + + if (!aggregated.length) { + return null + } + + return ( + + Parameters + {aggregated.map(p => ( + + ))} + + ) +} + +export default Parameters diff --git a/www/src/components/route-section.js b/www/src/components/route-section.js new file mode 100644 index 0000000000..8e8fc23524 --- /dev/null +++ b/www/src/components/route-section.js @@ -0,0 +1,19 @@ +import React from "react" +import { Flex, Box, Text } from "rebass" + +const RouteSection = ({ basePath, path, method }) => { + path = path.replaceAll(/{(.*?)}/g, ":$1") + + return ( + + + + {method} + + {`${basePath}${path === "/" ? "" : path}`} + + + ) +} + +export default RouteSection diff --git a/www/src/components/routes-overview.js b/www/src/components/routes-overview.js new file mode 100644 index 0000000000..3aec09412a --- /dev/null +++ b/www/src/components/routes-overview.js @@ -0,0 +1,64 @@ +import React, { useState, useEffect } from "react" +import styled from "@emotion/styled" +import { Flex, Box, Text, Image } from "rebass" + +const StyledRoutesOverview = styled(Flex)` + border: 1px solid #e3e8ee; + border-radius: 5px; + margin-left: auto; + margin-right: auto; + width: 100%; + max-height: calc(90vh - 20px); + overflow-y: scroll; + align-self: flex-start; + font-size: 1; + top: 20px; + bottom: 20px; +` + +const RoutesOverview = ({ content }) => { + if (!content) return null + + return ( + + + ENDPOINTS + + + + {content.map(route => ( + + + {route.method} + + + {route.path.replaceAll(/{(.*?)}/g, ":$1")} + + + ))} + + + + ) +} + +export default RoutesOverview diff --git a/www/src/components/select.js b/www/src/components/select.js new file mode 100644 index 0000000000..41f0a2e861 --- /dev/null +++ b/www/src/components/select.js @@ -0,0 +1,107 @@ +import React from "react" +import { Flex } from "rebass" +import { Label, Select as RebassSelect } from "@rebass/forms" +import styled from "@emotion/styled" + +import Typography from "./typography" + +const StyledSelect = styled(RebassSelect)` + ${Typography.Base} + padding-right: 28px; + + ${props => + props.isCurrencyInput && + ` + box-shadow: none; + border: none; + + &:hover { + box-shadow: none; + } + `} +` + +const StyledLabel = styled.div` + ${Typography.Base} + ${props => + props.inline + ? ` + text-align: right; + padding-right: 15px; + ` + : ` + padding-bottom: 10px; + `} + + ${props => + props.required && + ` + &:after { + color: rgba(255, 0, 0, 0.5); + content: " *"; + } + `} +` + +const Select = React.forwardRef( + ( + { + name = "", + label = "", + defaultValue = "", + options = [], + placeholder = "", + value, + onChange, + inline, + required, + selectHeight, + isCurrencyInput, + ...props + }, + ref + ) => { + return ( + + {label && ( + + )} + + {placeholder && } + {options.map((option, index) => ( + + ))} + + + ) + } +) + +export default Select diff --git a/www/src/components/sidebar.js b/www/src/components/sidebar.js new file mode 100644 index 0000000000..59d868aa9c --- /dev/null +++ b/www/src/components/sidebar.js @@ -0,0 +1,136 @@ +import React, { useState, useEffect } from "react" +import { Link, navigate } from "gatsby" +import { Flex, Box, Text } from "rebass" +import { AnchorLink } from "gatsby-plugin-anchor-links" +import styled from "@emotion/styled" +import Collapsible from "react-collapsible" + +import Select from "./select" + +const convertToKebabCase = string => { + return string.replace(/\s+/g, "-").toLowerCase() +} + +const StyledNavItem = styled(Flex)` + padding-left: 16px; + padding-right: 10px; + align-items: center; + border-radius: 5pt; + cursor: pointer; + margin-bottom: 5px; + height: 25px; + + &:hover { + background-color: #e0e0e059; + } +` + +const StyledAnchorLink = styled(AnchorLink)` + display: flex; + margin-left: 10px; + padding-left: 10px; + padding-right: 10px; + align-items: center; + border-radius: 5pt; + cursor: pointer; + margin-bottom: 5px; + text-decoration: none; + align-items: center; + color: black; + height: 25px; + [fill*="red"] { + fill: #454545; + } + &:hover { + ${props => + !props.active && + ` + background-color: #e0e0e059; + `} + } + &.active { + background-color: #e0e0e0; + } +` + +const SideBarContainer = styled(Flex)` + position: sticky; + top: 0; + height: 100vh; + overflow-y: scroll; + background-color: #f0f0f0; + min-width: 250px; + flex-direction: column; +` + +const StyledLink = styled(Link)` + color: #212121; + font-decoration: none; +` + +const SideBar = ({ tags }) => { + const [api, setApi] = useState("store") + + useEffect(() => { + const pathname = window.location.pathname + const matches = pathname.match(/api\/(store|admin)/) + if (pathname.length > 1) { + setApi(matches[1]) + } + }, []) + + return ( + + + + + medusa + + + +